pods_error in the same form page?
-
I’m using a hook to validate a field and return an error if the field is invalid:
add_filter('pods_api_pre_save_pod_item_revendedores', 'testa_campos', 10, 2); function testa_campos($pieces, $is_new_item) { $maps = $pieces[ 'fields' ][ 'maps' ][ 'value' ]; if (substr($maps, 0, 20) != "https://goo.gl/maps/") { return pods_error ('error'); } }
However,
pods_error
shows the error on another page.
How to show the error in the same page of the submitted form?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘pods_error in the same form page?’ is closed to new replies.