Hi,
sorry for my inexperience.
I'm realizing an acceptance form in CF6.
We must do n. 2 acceptance with flag or selection by drop-down Yes / No, for which it is not possible to activate the event tabs for a final action: enable / disable the submit button, but you must add the two acceptances.
I thought about creating a PHP options with the different possibilities.
Question:
can you help me to write PHP to activate / deactivate the submit button?
To make effective the return of the PHp options I use a custom code to direct it to the submit button? with what syntax?
Reference elements:
1 dropdown: field_select1 => choices: n = No, y = Yes
2 dropdwon: field_select2 => choices: n = No, y = Yes
Many thanks for the time you dedicate to me
sorry for my inexperience.
I'm realizing an acceptance form in CF6.
We must do n. 2 acceptance with flag or selection by drop-down Yes / No, for which it is not possible to activate the event tabs for a final action: enable / disable the submit button, but you must add the two acceptances.
I thought about creating a PHP options with the different possibilities.
Question:
can you help me to write PHP to activate / deactivate the submit button?
To make effective the return of the PHp options I use a custom code to direct it to the submit button? with what syntax?
Reference elements:
1 dropdown: field_select1 => choices: n = No, y = Yes
2 dropdwon: field_select2 => choices: n = No, y = Yes
Many thanks for the time you dedicate to me
Hi prince,
You want to have the submit button in a different page ? if so then you can build a multi page form.
How the n2 acceptance should work exactly ?
Best regards
You want to have the submit button in a different page ? if so then you can build a multi page form.
How the n2 acceptance should work exactly ?
Best regards
Ok, when the form loads, both the bottom dropdown and button will be disabled ? you can enable the dropdown first then enable the button using the just enabled dropdown
Best regards,
Best regards,
when the form is loaded the drop-down menus are enabled (and validation is required - mandatory head); the button will be disabled.
with the confirmation of both the drop-down menus (Yes) the button is enabled.
No other combination of pull-down menus other than Yes for both enable the button
Best regards,
with the confirmation of both the drop-down menus (Yes) the button is enabled.
No other combination of pull-down menus other than Yes for both enable the button
Best regards,
And you want both of the dropdowns set to yes to enable the button, correct ?
So I think that you should keep the button and the dropdown disabled, enable the 2nd dropdown after the first one is set to yes, and enable the button with the 2nd dropdown.
Best regards,
Best regards,
It is the first solution I have adopted.
Not good has this drawback: if after doing the whole sequence you indicated, I choose in the first menu No, the button remains active and the second menu is disabled.
It is necessary a logical connection between the choices of the two menus that for example I believe can be done by inserting an element Php options, sending the return of the Php to the button.
I'm not sure why not very experienced ... and I do not know what syntax to adopt for the code.
Not good has this drawback: if after doing the whole sequence you indicated, I choose in the first menu No, the button remains active and the second menu is disabled.
It is necessary a logical connection between the choices of the two menus that for example I believe can be done by inserting an element Php options, sending the return of the Php to the button.
I'm not sure why not very experienced ... and I do not know what syntax to adopt for the code.
ALSO disable the button in the dropdown1 event when selecting No. Better yet, set both dropdowns to "required" and in your options list put
=NoThat way if they select "no" then it's not a VALUE (only has the label) and they won't be able to submit the form.
1=Yes
This topic is locked and no more replies can be posted.