Submit form on Dropdown selection

allanb

Member
Hi Everyone.
I need advice. I have a form with a subgroup of information that are hidden when the form loads. The user has to select "Yes" from an dropdown named "Accept?" in order for the subgroup elements to display.
upload_2020-4-3_10-8-17.png
Once the user selects "Yes" from the dropdown I have a Javascript On Click event to disable the dropdown to prevent the user from simply select no again and submitting the form (after jotting down the information.) This all works well.
upload_2020-4-3_10-8-53.png

Here is my dilemma, the user can simply close the windows/browser and the form is not submitted/saved leaving the record as "Not accepted" while the user had access to the data.

I need to save/submit the form when the user selects "Yes" from the dropdown. Is this possible?
 
At Javascript On Click event you can add new ajax call to update the value on dropdown element or you can call $('.fabrikActions [type="submit"]').click(); to autosave the form after dropdown selected.
 
JS is never a security means. The (via JS) "hidden" group is showing the data already in the page source so it's exposed anyway.
 
At Javascript On Click event you can add new ajax call to update the value on dropdown element or you can call $('.fabrikActions [type="submit"]').click(); to autosave the form after dropdown selected.

Thank you for the reply. I would prefer the second option, that is to call $('.fabrikActions [type="submit"]').click(); to autosave the form after dropdown selected. How would I go about doing this?
 
E.g.

Create a Joomla user group + access level
Set group access to this access level
On form save add the user to this group and add a redirect plugin to the form itself (maybe with conditions "if the user doesn't beloing to this group already...")
 
Maybe you can in Joomla Menu another FabrikList menu with the Pre-filter to:

AND userid EQUALS {$my->id} No quotes Public
AND Accept EQUALS 1 No quotes Public

And then redirect to that new menu at Fabrik Form settings: index.php/myaccepted/form/99/{rowid}

Addtionally in the previous menu you show only the Accept / Reject element and in the new menu you show all the elements.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top