can i use fabrik similar to a cash register?

rongame

Member
guys

can we use fabrik to perform similar to a cash register where in every time the barcode feeds data to an element it displays as an entry on a list? no need to hit enter or save.

1. i think autofill can be used but how will it save automatically
2. how to bring the focus or cursor to the same element with the lookup?

thanks
 
Not sure what you mean by "displays as an entry on a list"?

What I think you are asking for is some way of auto-filling a form, and having it also auto-submit?

-- hugh
 
how does your barcode reader work? Does it mimic a keyboard, so when you scan the text is entered into which ever field has the focus?
What exactly should happen once that scan / input has occured?
 
hi rob, thanks for replying immediately

my barcode scanner simply reflects a code (8 characters) all from the keyboard, may be maximum of 16 characters.

i created a form that has the following

name = john
username = john23
email = joen23@gmail.com
first name = john
last name = doe
age = 16
barcode = 1234-6789

what i want to achieve is to create a form that as scan input occurs will automatically search for the corresponding record (autofill) and save it (auto submit). just like a POS, point of sale in supermarkets or shopping malls, when we buy something they simply scan it, then appears on the screen and done.

so the barcode output is really not my problem since the output code is part of the record. if the bar code displays 1234-6789 on the search field, the form should automatically search for the rest of the record or autofill the rest of the form (name, username, email, etc) save it and so on.

Also similar to a log i think. how can i achieve this?

thanks rob
 
Seems like this should be fairly easy. Just a normal autofill form plugin, but with a little custom JS to kick off an auto-submit when the autfill completes.

Have you gotten the autofill plugin working?

-- hugh
 
Just FYI I'm working on the issues with autofill and either the upload or image element, following our live chat tonight.

-- hugh
 
thanks hugh

is this because of the joomla version? Joomla! 3.2.0 Stable [ Ember ] 6-November-2013 14:00 GMT

Should i revert to joomla 3 or joomla 2.5 for other projects?

thanks
 
for me, joomla 3.1.6 is nice and stable I use it for all my current and future projects, and will wait another few months before considering j3.2

I always prefer waiting 6 months or so before upgrading just to be sure.

I feel for the fabrik guys, as the issues are all clearly related to a buggy j3.2 version and not necessarily fabrik.
 
This one is nothing to do with J!. It's specific to images when using the autofill plugin. J! 3.1 or 3.2 are fine. Definitely don't go back to 2.5.

Well, it's a combination of issues. The original element he is autofilling from is an upload. But HTML itself prevents us from autofilling an upload element from JavaScript, as that would be a huge security issue. So he's using an image element on the form being filled, which should work, and is actually more appropriate - the file already exists on the server, so the autofilled form just needs to select that already existing uploaded image. But for reasons I don't quite understand yet, the folder path is not being prepended to the file name on the autofill response.

-- hugh
 
OK, I'm, almost there.

http://screencast.com/t/2ffoNttiu

... just got some path issues with the image element, where it's prepending the folder path twice on first save.

Basically, we're doing something with the image element it wasn't intended to handle, which is setting it's value, when "front end select" is not enabled. The image element pre-dates the autofill form plugin by several years, and it seems like you are the first person who has tried to use an image element with autofill. So we're running in to a few issues that have never come up before.

Anyway ... I'll have it done soon. I'm committing what I have so far, so you can at least start experimenting with it.

https://github.com/Fabrik/fabrik/commit/fac24a68ed410c83bf4ef32b0c2dbae2a9db15ed

-- hugh
 
Oh, and here is the code you'll need to submit the form automatically:

Create a form JS file as usual, by adding the file form_X.js (where X is the numeric ID of your form) in ./components/com_fabrik/js, with this:

Code:
/*
  * Adds a 'fabrik.loaded' event, which fires when the main Fabrik object has finished initializing
  * on page load, and Fabrik is all loaded up and ready to go.  Within that, add a 'fabrik.form.autofill.update.end' event,
  * which will fire when an autofill is finished on the form.  Within that, fire a doSubmit() for the form.
  */
window.addEvent('fabrik.loaded', function () {
  Fabrik.addEvent('fabrik.form.autofill.update.end', function (form, json) {
      form.form.doSubmit(new Event.Mock(form.form._getButton('Submit')), form.form._getButton('Submit'));
  });
});
-- hugh
 
hi hugh

few clarifications, we keep on talking about the autofill plugin and image plugin only. my setup includes a database join then autofill form plugin. is this ok?

also, should i be updating in the github now? or just search the autofill and image plugin then update?

thanks
 
Having a join should be fine. Is it giving you problems?

Just to clarify, is the join element part of what you are autofilling? Is it the element you use for selecting the autofill record? Or is it unrelated, just a join on the form that has the autofill, but not used by / in the autofill?

I would have a look, but the login you gave me on live chat the other day I was using to get at your site to do this no longer works.

Re "should I be updating" ... as I said in my last post:

I'm committing what I have so far, so you can at least start experimenting with it.

Make sure on your image element you turn off the front end selection option, and enter the path to your uploaded content in the 'Image' setting. This currently produces some unwanted side effects (the path by itself showing in list view), but I'm working on fixing those.

-- hugh
 
Having a join should be fine. Is it giving you problems?
it just keeps on spinning and finaly "null"
Is it the element you use for selecting the autofill record? Or is it unrelated, just a join on the form that has the autofill, but not used by / in the autofill?
yup, this is what i used for the autofill. this element.
please try the user and password again.

thanks so much
 
OK, we finished our live chat a few minutes ago.

Couple of things:

1) The image.js was still the old JS file, not the latest github, so it didn't have my fixes in it. I updated that.

2) The fileupload you were trying to pick up the image path from was an AJAX upload one, which means it has (potentially) multiple file paths which are stored in a separate table, and are returned in a different (JSON) format to the autofill plugin, not a simple, single file path. As it makes no sense to try and map (potentially) multiple upload images onto a single image element, I changed that upload element back to non-AJAX (which means the content of that element is now back to whatever it was before you switched it to AJAX).

The autofill now pretty much seems to be working, although I still need to resolve those image path issues, which I'm working on locally now.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top