WordPress.org

Ready to get started?Download WordPress

Forums

Participants Database
regex validation for a field (8 posts)

  1. franc3s
    Member
    Posted 1 year ago #

    Hi,
    I'm using a signup form with your plugin. Can you help to set a validation? I think I should use the Regex one but I don't know how to! :(

    I want to have a checkbox field that is selectable only if the previous checkbox is checked!

    Thank you very much!

    http://wordpress.org/extend/plugins/participants-database/

  2. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    What you want to do may be possible, but not with a regex, which only looks at the input provided by the user, not the state of another field.

    Perhaps if you explained what you need to do and why, a practical solution could be suggested.

  3. franc3s
    Member
    Posted 1 year ago #

    Thank u Xnau you always are so quick and kind!

    I have a subscription for a running team. One question reguards one special program of the subsciption:

    Q11: Do u wanna agree to Program XY?

    Question 12 regards a subprogram of the XY program so in order to let user choose this option, the form should verify that Q11 has been checked. Otherwise Q12 is not applicable..

  4. franc3s
    Member
    Posted 1 year ago #

    (I don't know how can I modify the topic title, since Regex is wrong!)

  5. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    franc3s,

    OK, well, the plugin doesn't have a built-in way to do this kind of thing. Usually, a function like this in a form would be handled with Javascript because you don't really want the person to actually submit the form in order to validate the checkbox. It also gives you an opportunity to hide an irrelevant option unless they click the checkbox.

  6. franc3s
    Member
    Posted 1 year ago #

    Mmmm, but I really don't know what I should do and where?
    Could you help me?

  7. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    franc3s,

    ...well, you'd kinda have to have some skills to pull this off. It's not something I can just give you the code for.

    If you go searching around for stiff like "jquery wordpress forms validation", you'll find what you're looking for, but it won't be something you can just plug in, because you have a pretty specific need. jQuery makes it very easy, though.

  8. franc3s
    Member
    Posted 1 year ago #

    I'll have to figure out a different way to obtain my needs! :(

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.