• Resolved khani26

    (@khani26)


    Hi All,

    I am looking for below sequence of action. How can i achieve this by this plugin or other html / javascript or php code.

    It consist of 6 form field and calaculate a formula
    Suppose F1+F2+F3+F4 , now this formula parse into 3/4 (if else statement) and based on condition it will created a (button to redirect or directly redirect ) to a page/post with specific report / images and media.

    also I need to use stored input text variable in F5 and F6 so i will use/pass it those variable in HTML command.

    Thanks
    -IK

    https://wordpress.org/plugins/calculated-fields-form/

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    If you are using any of the paid versions of the plugin it is possible to associate a thank you page to the form, and in the thank you page insert a shortcode to display a summary with the information submitted.

    In reality I don’t understand your equation, but I will assume you want to display the submit button if the sum of fields: fieldname1, fieldname2, fieldname3, and fieldname4 is bigger than 5 and less than 20, in this case:

    I will insert the four number fields, a calculated field to be used as auxiliary (the field won’t be relevant in the form’s interface, so, should be ticked the attribute to hide it from the public web page), and a button field with the special class: hide

    The onclick event assigned to the button would be as simple as:

    jQuery(this).closest('form').submit();

    and the equation associated to the calculated field:

    (function(){
    var result = fieldname1+fieldname2+fieldname3+fieldname4;
    
    if(5<= result && result <=20 ) jQuery('.hide').show();
    return result;
    
    })()

    Furthermore, you have created a different webpage with the texts, graphics, and the summary shortcodes. Enter the URL of the new page as the “Thank you” page in the form’s settings (after the form be submitted, the user is redirected to the thank you page).

    More information about the shortcode to insert in the thank you pages:

    http://cff.dwbooster.com/documentation#thanks-page
    http://cff.dwbooster.com/documentation#special-tags

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘If else code and input field value store into variable’ is closed to new replies.