Home › Forums › Quform WordPress › Conditional Submit to another URL
- This topic has 6 replies, 2 voices, and was last updated 9 years, 7 months ago by Ally.
- AuthorPosts
- September 14, 2014 at 5:26 pm #12416gordonbrowParticipant
I have a dropbox which triggers a conditional call to file upload. The submit button is set to go to a URL. Is it possible to have the submit button NOT go to the URL if the check box is selected?
September 17, 2014 at 11:13 am #12449AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
September 19, 2014 at 4:14 am #12500gordonbrowParticipantThanks Ally, you made my day.
September 21, 2014 at 12:35 am #12521gordonbrowParticipantI used the following code but get a syntax error – see attached. Did I miss something?
function my_post_process($form)
{
$value = $form->getValue(‘iphorm_6_72’);if (in_array(‘upload file’, $value)) {
$form->setSuccessType(‘message’);
}
}
add_action(‘iphorm_post_process_6’, ‘my_post_process’);Attachments:
You must be logged in to view attached files.September 22, 2014 at 12:21 pm #12544AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
September 24, 2014 at 3:53 am #12578gordonbrowParticipantThanks . . that worked perfectly. One more question. I have multiple forms on this site and want to apply the same function. Do I just change the value of “$form”?
September 25, 2014 at 9:32 am #12594AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.