WordPress.org

Support

Support » Plugins and Hacks » Calculated Fields Form » [Resolved] Required button on drop down – no effect

[Resolved] Required button on drop down – no effect

  • Great Plugin !!! only 1 issue
    I added a dropdown which the user NEEDS to answer to get the right logic and I ticked the “required” field but it seems to have no effect ??

    Is it me ? can you point me in the right direction to fix it ?

    is it in the Fields Public or Admin I should look ?? I guess its js as its validate ??

    thanks

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

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author codepeople

    @codepeople

    Hi,

    First, leaves empty the value of the first option in the drop-down field, and then check the attribute “required” of field.

    Best regards.

    Thanks that really works if I use a page break but I was trying use something your colleague gave me

    1. Inserts a calculated field in your form, and assign to it a classname through the attribute “Add Css Layout Keywords”. I will use the classname myclass

    2. Set the class definition in any of styles files of your website:

    .myclass{ display: none;}

    3. Insert an “Instruct. Text” field, and set in the attribute: “Instructions for User”, the snippet of code below:

    <input type="button" value="calculate" onclick="jQuery('.myclass').show();">

    That works exactly how i intended – except it does not validate like page break “next” button does I wish I could combine validate with the

    <input type="button" value="calculate" onclick="jQuery('.myclass').show();">

    button – is that possible

    This is a GREAT plugin Im going to rate it 5 when when I finish
    Support = EXCELLENT Functionality = EXCELLENT

    Plugin Author codepeople

    @codepeople

    Hi,

    In this case the button’s tag should be modified like follow:

    <input type=”button” value=”calculate” onclick=”jQuery(‘.myclass’).show();jQuery(this).parents(‘form’).valid();”>

    Best regards

    Works great !! but the .myclass shows even though the red box “This field is required” shows its kind of 90% right if only I could replicate the same as “page break” as if I use page break the rest of the form is hidden but I only have to fields so it looks kinda strange to have a page break 🙂

    but thanks your code is accurate and Im really impressed I rated you 5* 🙂

    Plugin Author codepeople

    @codepeople

    Hi,

    I’m sorry, in this case use the following code for the button:

    <input type=”button” value=”calculate” onclick=”if(jQuery(this).parents(‘form’).valid()) jQuery(‘.myclass’).show();”>

    Best regards.

    wow Perfect !!!! I send you a virtual “pat on the back” and a beer
    Im glad I rated u guys 5″ you deserve it !!! thanks

    Now I have bought the plugin and when I validate the “unhiddrn” parts

    The Hidden parts are invalid so I added another button to move forward

    but I am struggling to reset the validation for the hidden parts and the error messages if you have more than 1 clutter the screen is it possible to have a “reset” like Jazzy forms ?

    ty

    Plugin Author codepeople

    @codepeople

    Hi,

    I’m sorry, I don’t understand your question. If you are using dependencies, the hidden fields are not considered for validation.

    About the reset button. Our plugin does not includes a reset button, but you can insert it in a very easy way:

    First, insert an “Instruct. Text” field in form, and then in the attribute: “Instructions for User”, paste the following code:

    <input type=”reset” value=”Reset” />

    Best regards.

    thanks I was trying to remove the “This field is required.” messages

    after I did this :
    <input type=”button” value=”calculate” onclick=”if(jQuery(this).parents(‘form’).valid()) jQuery(‘.myclass’).show();”>

    and the user had missed a radio field – the message is right over the input filed so he can never get rid of it

    I was testing with jquery (“form”).validate().resetForm();

    and jQuery(this).parents(‘form’).resetForm();

    but it never worked

    Plugin Author codepeople

    @codepeople

    Hi,

    If you want hide the messages after validate the form, you should use the code:

    jQuery(‘.cpefb_error.message’).hide();

    Best regards.

    Thanks 🙂

    Oh NO NOW A MAJOR PROBLEM :

    Everything was working fine on the free version 🙂 So I bought the pro version

    and as soon as I added the “Email field” the form broke

    <input type=”button” value=”calculate” onclick=”if(jQuery(this).parents(‘form’).valid()) jQuery(‘.myclass’).show();”>

    just stops – the form never shows I am so unhappy :-((

    I don’t know what to do I just bought the plugin and the free one works and pro doesn’t ??? should be the other way round

    ************* Please help 🙂

    I forgot to add the email has not got “required” checked

    I just found out even with no required it is required I want to turn that off please

    Well I deleted the email and put a new one in and it works again must have got stuck

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘[Resolved] Required button on drop down – no effect’ is closed to new replies.
Skip to toolbar