Home Forums Plugin Support WP User Frontend Pro Field Validation?

This topic is: resolved

This topic contains 8 replies, has 2 voices, and was last updated by  bazelski 6 years, 1 month ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2130

    bazelski
    Participant
    Post count: 28

    Im tryng to validate field if is empty with wpuf_add_post_validation but its not working. Also I didnt find anything about this filter  in the wpfu Pro documentation. Im using the example from this page http://tareq.wedevs.com/2012/04/how-to-extend-wp-user-frontend/

    #2131

    Tareq Hasan
    Keymaster
    Post count: 2831

    Unfortunately, there isn't any validation field right now. Everything is done in client side with JavaScript.

    #2134

    bazelski
    Participant
    Post count: 28

    Can I use something like this  ?

    #2137

    Tareq Hasan
    Keymaster
    Post count: 2831

    Can I use something like this ?

    Is that relevant to validation?

    #2138

    bazelski
    Participant
    Post count: 28

    Yes If I can add default value to existing dropdown field in form and then validate like a normal dropdown field from the plugin

    #2139

    Tareq Hasan
    Keymaster
    Post count: 2831

    I am not sure about your context, are you adding a new field to the from by using any hook?

    #2142

    bazelski
    Participant
    Post count: 28

    Yes.  Select (dropdown field) with post IDs from posts submited by current user. Selected post ID  is saved as custom field value in the submited post and I use that value to connect posts with the Posts2Posts plugin . I need that field to be required, to validate on form submit

    #2143

    Tareq Hasan
    Keymaster
    Post count: 2831

    You can add a HTML5 data attribute to your select field data-required="yes". That'll make it required.

    #2145

    bazelski
    Participant
    Post count: 28

    yes data-required=”yes” and data-type=”select” in the html and its working. Thanks

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Field Validation?’ is closed to new replies.