WordPress.org

Forums

Calculated Fields Form
[resolved] Required button on drop down - no effect (22 posts)

  1. metanoia77
    Member
    Posted 1 year ago #

    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/

  2. codepeople
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. metanoia77
    Member
    Posted 1 year ago #

    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

  4. codepeople
    Member
    Plugin Author

    Posted 1 year ago #

    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

  5. metanoia77
    Member
    Posted 1 year ago #

    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* :-)

  6. codepeople
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  7. metanoia77
    Member
    Posted 1 year ago #

    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

  8. metanoia77
    Member
    Posted 1 year ago #

    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

  9. codepeople
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  10. metanoia77
    Member
    Posted 1 year ago #

    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

  11. codepeople
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

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

    jQuery('.cpefb_error.message').hide();

    Best regards.

  12. metanoia77
    Member
    Posted 1 year ago #

    Thanks :-)

  13. metanoia77
    Member
    Posted 1 year ago #

    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 :-)

  14. metanoia77
    Member
    Posted 1 year ago #

    I forgot to add the email has not got "required" checked

  15. metanoia77
    Member
    Posted 1 year ago #

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

  16. metanoia77
    Member
    Posted 1 year ago #

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

  17. metanoia77
    Member
    Posted 1 year ago #

    It was the predefined value hide on click - as soon as I added that the form automatically validates it as invalid I had <--- enter email --->
    hide on click

  18. codepeople
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    I'm sorry, but with all tickets you have posted I don't know now if your form is working fine or not. If the issue persist, please send me the link to your page to check it in detail.

    Best regards.

  19. metanoia77
    Member
    Posted 1 year ago #

    Its ok I fixed it - I deleted email field and re-added 1 :-) it had somehow got stuck
    Its fixed

  20. Jacqui
    Member
    Posted 8 months ago #

    Thank you for a great plugin.

    Just one question, that doesn't seem to mentioned in the FAQ.

    I've created a button and when someone clicks on it I want it to take them to a different page. What do I put in the 'OnClick event' box to achieve this?

  21. codepeople
    Member
    Plugin Author

    Posted 8 months ago #

    Hi,

    If you want navigate to a different page of website, you should use the document object of the DOM, like follow:

    document.location="http://wordpress.dwbooster.com"

    Best regards.

  22. Jacqui
    Member
    Posted 8 months ago #

    Thank you. Worked perfectly.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Calculated Fields Form
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.