Home › Forums › Quform WordPress › Passing Form values from form to form with multiple choice element
- This topic has 10 replies, 2 voices, and was last updated 10 years ago by drewman1970.
- AuthorPosts
- April 24, 2014 at 5:57 pm #9690drewman1970Participant
I have used the following code in my functions.php file
/*quform custom redirection*/
function my_form_redirect($url, $form)
{
$data = array(
'imove_pickup' => $form->getValue('iphorm_1_2'),
'imove_location' => $form->getValuePlain('iphorm_1_9'),
);$data = array_map(‘rawurlencode’, $data);
$url = add_query_arg($data, ‘http://novaproduction.net/andrew/imovenetwork/search-local-movers’);
return $url;
}
add_action(‘iphorm_success_redirect_url_1’, ‘my_form_redirect’, 10, 2);/*end*/
This works for regular fields, but what I need to know is: How do you pass values from one multiple choice area to another multiple choice area on form 2?
What is the syntax? My multiple choice is named imove_location with the id in first form _1_9
'imove_location' => $form->getValuePlain('iphorm_1_9'),
I want to have the value in form one trigger the same value in form two which in-turn activates the conditional element on form 2 and in this case reveals the hidden form.
April 26, 2014 at 6:04 am #9715drewman1970ParticipantAnybody know how to do this?
April 28, 2014 at 1:10 pm #9734AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 28, 2014 at 1:18 pm #9736AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- This reply was modified 10 years ago by Ally.
April 28, 2014 at 4:43 pm #9742drewman1970ParticipantI tried the above suggestion(s), but this still does not work. The value in the multiple choice is not passed to the second form.
Any other suggestions on how to pass multiple choice values?
April 29, 2014 at 5:17 pm #9758AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 29, 2014 at 5:32 pm #9759drewman1970ParticipantYes, the actual multiple choice radio button element ( one choice only)
- This reply was modified 10 years ago by drewman1970.
April 29, 2014 at 5:46 pm #9761drewman1970ParticipantSorry, I missed your last question:
Yes the values are being passed in the url, but are not being selected in the inline radio button (one choice) element which in-turn activates the condition to load the appropriate hidden form based on the selection.
The values are being passed as you can see, but not activated in form 2.
Please mark private ( I did not see an option)
- This reply was modified 10 years ago by drewman1970.
April 29, 2014 at 5:53 pm #9762AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 29, 2014 at 6:04 pm #9764drewman1970ParticipantOk, thanks for that tip – but when the radio is selected from the passed value it does not trigger the hidden form the same as it would if you clicked on it.
How can we resolve this and make it work?
April 29, 2014 at 6:05 pm #9765drewman1970ParticipantOH, never mind – I know what it is.. I change the value name CAN and now the condition is changed
- AuthorPosts
- You must be logged in to reply to this topic.