Multiple choice, submission URL and Joomla User

Adam McGill created the topic: Multiple choice, submission URL and Joomla User

Hi

I need to analyse the status of the items checked in the multichoice element and then use some javascript code to change the after submission url.

My questions:
1. in javascript, if I know the field id, how can I check that the field within the multi choice element has been checked or not?
2. what is the field id of the after submission URL field

I also need to add the Joomla user ID to my form in a hidden field. What is the javascript to access the Joomla user ID please.

Thanks for your assistance.

Regards

Adam

#41713

Please Log in or Create an account to join the conversation.


Support replied the topic: Multiple choice, submission URL and Joomla User

Dear Adam,

Please see the answers to your questions below.

- If you need to check if a checkbox option has been marked or not, please see the instructions here:
www.javascript-coder.com/javascript-form...ript-get-check.phtml

And there is an example with jQuery here:
stackoverflow.com/questions/2834350/get-...kbox-value-in-jquery

- Could you please specify this part of your post?

What is the field id of the after submission URL field?


- As for the user ID, unfortunately this won't be possible to do with Javascript. We can make a small customization and add username to MySQL Mapping of the extension, since you have Form Maker Pro.

Thank you!


Best regards,
Web-Dorado team


Joomla extensions ,
Wordpress plugins ,
Drupal modules
#41795

Please Log in or Create an account to join the conversation.


Adam McGill replied the topic: Multiple choice, submission URL and Joomla User

Thank you for the answers to my questions.

To be clear, I would like to customise the After submission URL found under Form Options, Actions After Submission, URL. The URL to be used is dependent on the user's multi choice selections on the form before it is submitted.

My thoughts are to place some javascript in Before Form Submit to calculate what the Actions After Submission URL should be. Is my logic suitable? If so, I would like to know the name of the Actions After Submission URL field please so I can use javascript to update it.

I hope I have clarified this question. Please contact me if you more information.

Thank you for your help.

Regards

Adam

#41801

Please Log in or Create an account to join the conversation.


Support replied the topic: Multiple choice, submission URL and Joomla User

Dear Adam,

This can be possible with a little jQuery coding. Here's how it can be done. Please add your code to Form Options > Additional Javascript. Start with defining new function as follows:

function changeAction() {
    // statements and functions which need to be executed.
}

To complete form submission, besides running this code, you need to call check_requiredX(); function in the beginning of the script, where X is the ID of your form:
function changeAction() {
    check_requiredX();
    // statements and functions which need to be executed.
}

Afterwards please create a custom button, calling changeAction(); in its OnClick function option. The script shall run properly and complete submission as predicted.

Thank you!


Best regards,
Web-Dorado team


Joomla extensions ,
Wordpress plugins ,
Drupal modules
#41823

Please Log in or Create an account to join the conversation.


Time to create page: 0.178 seconds
Powered by Kunena Forum

WORLD-CLASS SUPPORT

We are here for you every step of the way. Turn to our support with any questions you might have about our products and services. Our experienced customer care team is available to help you as fast as we possibly can.

Contact us