Autofill js error

OK, I'm going to need to do some debugging. I can't replicate the issue here, but obviously something is moofed on your site.

Can you fill in the ftp site on your My Sites? I'd like to upload a known good github, and be able to insert some debugging code.

You may want to do a full backup before I do that, just in case. I do try not to hose people's sites up, but ... ;)

-- hugh
 
OK, I see the problem.

You have "Edit original record" set to Yes. The tooltip for this option needs a little improvement. This should ONLY be used if the list you are autofilling from is the SAME list your form is on. This enabled you to put a join on a form, pointing to it's own table. use that as the autofill observe. Then you can select a record from the form's own list.

Then if "Edit original record" is set to yes, when you do the autofill on the form, we change the hidden 'rowid' field to be that of the row you just autofilled from ... so when you submit the form, you are editing that row, not creating a new one.

You should NEVER set this option if the list you are autofilling from is a different list.

BTW ... you actually kind of lucked out, as there's a bug in the autofill plugin which isn't setting that rowid correctly when it runs, rather it's getting set to 'undefined' ... so I noticed that 'undefined' in your hidden fields, which led to the Ah AH! moment.

I've set "Edit original record" to No, and your test form now submits fine.

BTW, did you set that to Yes yourself, or did it somehow default or set itself?

-- hugh
 
OK, I'm about to commit the fix for the case where you do actually want to use "Edit original record", although that's not directly relevant to you.

I've updated the wiki with a warning, and I'm about to improve that tooltip text as well.

So, hopefully, if you just turn that option of on your actual form, it should work. Although I'm still a little scared by the complexity, as you have autofill watching a CDD, and an autofill in a repeat group, both of which lead to fairly complex JS / AJAX / event junk 'n' stuff. I'll be very happy if it works, though. :)

-- hugh
 
Thank you very much for help, Hugh, indeed, the "problem" was about that option. I was convinced that it have to be set to Yes, good to know for future.

The form will be even more complex, few more features have to be added to this :) I promise i will ask you only if i have no clue what could be wrong :)
 
Never worry about asking questions - that's what we are here for. We just appreciate it if you put in "due diligence" ... just make sure you read the tooltips for options, check the wiki, and search the forums.

Just be aware that your form is starting to push the envelope. We do our best to make sure individual features work, but the permutations of plugins are ... well, I could do the math if I could be bothered to count all our plugins, but the possible combinations are probably up in the many millions (factorials get big, real quick!) ... so we can't ever hope to test all combinations. And one of the most problematic areas are those involving JavaScript event handling, and especially with repeat groups, and things like autofill, and CDD's that "watch" other elements, and fire off AJAX calls.

Anyway, apologies for the lack of warning on that "Edit original" setting. On the bright side, your pain will benefit future users, now we've added those warnings!

-- hugh
 
Hugh, can you please take a look at the following small issue:

2 autofill plugins in the same form. I set a "Trigger" for the first instance, want to do the same for the second and select a element from the joined table as Trigger (the selected element look like this: contracte_campuri_636_repeat.Extraoptiune, is the same element selected as "Field to observe").

The second instance of this plugin will stop filling the fields (no problem for the first instance).

I don't see any error in debug console (firefox or chrome)..

Thank you
 
Try not setting that Trigger on the second. If it's the same element, then you shouldn't need to set the trigger.

-- hugh
 
I don't seem to be able to log in to your My Sites "testing" site any more. Whatever my LastPass has remembered doesn't work, and the password you specified doesn't work.

-- hugh
 
Hmmm dunno what the problem was last night. I tried letting LastPass fill it, and I tried copying and pasting the password form My Sites, it wouldn't let me in. But I seem to be able to log in now.

Taking a look.

-- hugh
 
Hang on, which form am I supposed to be looking at?

Your My Sites points at a /joomla3 test site, but I don't see a form there with two autofill plugins on it. And I can't log in to the front end. I can login to the backend, but on the front end on ...

http://your.site/joomla3/test-autofill

... I get a "site under construction" page which won't let me login.

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

Thank you.

Members online

Back
Top