Form validation problems: toggle submit + ajax + must validate

miss.take

New Member
Hi all.
I'm trying to understand the best way to obtain my desired workflow and yesterday I spent the whole day facing many problems related to the toggle submit function in forms.
I hope this would help those looking like me a widespread request in form validation.
So, this is my desired form and behavior and the fabrik's options I used... ie my scenario:

- Multipage free-to-browse tabs -> Fabrik bootstrap_tabs template;
- Realtime validation -> Fabrik Ajax validation on form;
- I want my users to send the form just at the end of the filling process, when all the fields are validated. Note that:
a. Almost all my fields have a "not empty" validation rule, often combined with regex or other custom rules;
b. I have different kinds of elements such as dropdown, txt, databasejoint, etc...
-> Fabrik "must validate" on every to-be-validated element.
Note that in my app,users can only add one set of datas.
First login, they generate a brand new main record (and multiple records related to it).
After first login they always update the same dataset.

Problems (bugs?):
Save button was always disabled because:
- Multiselects don't seem to be affected by real time ajax control. Ajax validations doesn't seem to work for them, so the button activation never trigger.
- Same thing for fileupload.
- Ajax validation only triggers on change... so on edit activity users must interact with ALL the fields to obtain a new validation... which is a big problem on a correctly filled form that just need to be edited and updated.

So I tried to fix this way:
- I removed the must validate control on multiselects and fileupload (validation only works when trying to send the form, which is a safe solution in any case: new record and edit record are controlled not in real time, but it is acceptable for a exiguous number of fields);
- For the others to-be-validated fields I duplicated the existing validations:
a. First one limited to new record, must validate: on;
b. Second one limited to edit record, must validate: off;

And the problem now is that my datas seems to be always part of an edit record and not a new one, so the save button remains always active.

I digged a lot in the forum and also tried the workaround proposed by @Bauer:
http://fabrikar.com/forums/index.php?threads/toggle-submit-button-alternative-code.47648/
And found lots of problems related to the ajax validation combined to must validate and toggle submit.

I am flexible about my form design, so I also used a multistep template, trying to obtain the save button at the end of the filling process, but also in this solution there are some problems:
- The save button is always shown, not only at the final tab as expected... and if I block it with the toggle submit I go back to the problems seen for the first solution;
- Forward button is always active, also if the global validation in page is not true (must press next to be blocked);
- I also have some problem with some of my custom validations.

Now I'm trying to
- Remove all the double validations, an the must validate, trying to keep just a must validate in a final checkbox with terms and condition.
This way I want to force the user to always accept terms and conditions in new record or in edit record...
The checkbox will be always off, to force a value change every time the user wants to check and modify his data.

Any idea on how let my ideal scenario works?
Thanks!
 
Ok, ok.
So... something new on this side?
Basically I am back on this problem.
If I want to validate my Ajax upload as "not empty", the only way to make it works is to give a max files value more than 1 (!!!)
I really do need my value to be 1, because my users have to upload not more than one required file.
Forget about the "must validate" in the post above (also useful but glitchy) but... any workaround for this?
@Bauer alternative on the post above didn't work for me...
THANKS!
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top