Formidable Pro form customisation


Job #: 7372 Post Date: 30.07.2017 13:10

General information for the website: Quiz Description of requirements/features: Hi, I'm looking for a quote for a relatively straightforward Formidable Pro/Wordpress customisation. I have a quiz form with one text field (persons name, the FIRST field), one hidden number field (quiz score, the LAST field) and 19 radio button fields (the question fields, all between the first and last fields). I am currently using two functions to 1) randomise the quiz questions and 2) reorder the answer options. However, both functions need amending to produce the results I want. Here is the function that shuffles the question order, but as you can see it shuffles ALL the questions, and I don't want it shuffling the text field (the first field in the form). I'm aware what needs doing in principle - copy the text field element to a holding array, delete the text field from $fields, shuffle $fields, then merge the text field back into $fields in the desired position - but don't have the coding knowledge to complete it. Also, the form is on a single page, not multi-page, so perhaps the frm_get_paged_fields filter isn't the correct one to use? // randomise form fields Formidable Pro add_filter('frm_get_paged_fields', 'get_extra_form_fields', 10, 3); function get_extra_form_fields($fields, $form_id, $error=false){ if($form_id == 12){ //change 12 to the id of the form to change shuffle($fields); } return $fields; } This next function changes the order of the answers for any single field, but I'd like it to loop through for all the radio button fields and change the order of them all, rather than just a single field. Again, in principle I know it just requires a simple loop, but I couldn't get it to work. // change order of multiple choice answers in formidable pro quiz form add_filter('frm_setup_new_fields_vars', 'frm_reorder_options', 30, 2); function frm_reorder_options($values, $field){ if ( $field->id == 141 ) {//Replace 141 with the ID of your field asort($values['options']); // sort the values here } return $values; } Can you help please? Thanks, Matt Extra notes:

Posted by

Required skills


Get the job done

Job type:
Hiring from:

?Bidding for first time? Click here to learn how StartAJob platform works.

?Want to do the job or have questions for the customer? Write then in the " Write a note or message to the customer"

?You already have the estimated cost and time to complete the work yuo are in the fields "Execution time" and "Payment requested" or leave them empty and can be changed later.


Generated in 1.4621 sec