Up to 50 percent off

Field Validation?

This topic contains 8 reply and 2 voices, and was last updated by bazelski 11 years, 7 months ago
Viewing 8 Posts - 1 through 8 (of 8 total)
Author Posts
April 13, 2013 at 7:55 am 2130
bazelski 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/
April 13, 2013 at 8:09 am 2131
Tareq Hasan Tareq Hasan

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

April 13, 2013 at 8:33 am 2134
bazelski bazelski

Can I use something like this  ?

April 13, 2013 at 8:49 am 2137
Tareq Hasan Tareq Hasan

Can I use something like this ?

Is that relevant to validation?

April 13, 2013 at 8:52 am 2138
bazelski bazelski

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

April 13, 2013 at 8:55 am 2139
Tareq Hasan Tareq Hasan

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

April 13, 2013 at 9:03 am 2142
bazelski bazelski

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

April 13, 2013 at 9:06 am 2143
Tareq Hasan Tareq Hasan

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

April 13, 2013 at 9:15 am 2145
bazelski bazelski

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

Viewing 8 Posts - 1 through 8 (of 8 total)