Currently, special characters are allowed in the first and last name fields, which can cause data issues and confusion. It would be better to restrict input to only letters to ensure names are entered correctly and processed smoothly.
Here’s a screenshot for reference: https://prnt.sc/OccWJ_Kt5HEU
Looking forward to your response.
Thanks!
]]>I’ve noticed an issue with the last name form input field. Users with compound names (e.g., O’Ralley) encounter errors because the field currently validates for single-word last names only.
Is there a hook or another method available to modify this validation?
]]>There are a couple of problems that we’re encountering using the form when CleanTalk is activated:
When we deactivate CleanTalk, all these things function properly.
Are there CleanTalk settings that would enable us to still have spam protection and for the form validation to work?
Thanks!
]]>I’m dynamically populating an email field with a $_GET variable, and then sending an email to that field. I’m running into problems with the form not validating the form because it doesn’t think it’s an email address. Is there a workaround to this or is it in development?
Thanks for your help!
]]>I have problem after trying to submit my form, I think it might be related to select option that I modified with this code https://gist.github.com/patrickfreitasdev/6196a5fd4cdebdfa5831868edcbed6a1
I want to make option from my post titles for my select input.. but after I add the codes it raise an error if I submit the form
this is my form export https://drive.google.com/file/d/1NKwBTPRt4wRJMabrno2ZtaG6ciX-NyxP/view?usp=drive_link
add_filter(
'forminator_cform_render_fields',
function( $wrappers, $form_id ) {
$allowed_forms = array (
847,
);
if ( ! in_array( $form_id, $allowed_forms) ) {
return $wrappers;
}
$select_fields_data = array(
'select-1' => 'post',
//'select-2' => 'CPT_2',
);
foreach ( $wrappers as $wrapper_key => $wrapper ) {
if ( ! isset( $wrapper[ 'fields' ] ) ) {
continue;
}
if (
isset( $select_fields_data[ $wrapper[ 'fields' ][ 0 ][ 'element_id' ] ] ) &&
! empty( $select_fields_data[ $wrapper[ 'fields' ][ 0 ][ 'element_id' ] ] )
) {
$posts = get_posts(
array(
'post_type' => $select_fields_data[ $wrapper[ 'fields' ][ 0 ][ 'element_id' ] ],
'category_name' => 'career'
)
);
if ( ! empty( $posts ) ) {
$new_options = array();
foreach( $posts as $post ) {
$new_options[] = array(
'label' => $post->post_title,
'value' => str_replace(' ', '-', $post->post_title),
'limit' => '',
'key' => forminator_unique_key(),
);
}
$wrappers[ $wrapper_key ][ 'fields' ][ 0 ][ 'options' ] = $new_options;
}
}
}
return $wrappers;
},
10,
2
);
add_filter(
'forminator_replace_form_data',
function( $content, $data, $fields ) {
$allowed_forms = array (
847,
);
if ( ! in_array( $form_id, $allowed_forms) ) {
return $content;
}
if ( ! empty( $content ) ) {
return $content;
}
$form_fields = Forminator_API::get_form_fields( $data['form_id'] );
$form_fields = Forminator_API::get_form_fields( 847 );
$data_field = '';
foreach($data as $key => $value){
if ( strpos( $key, 'select' ) !== false ) {
$values = '';
$field_value = isset( $data[ $key ] ) ? $data[ $key ] : null;
if ( ! is_null( $field_value ) ) {
$fields_slugs = wp_list_pluck( $form_fields, 'slug' );
$field_key = array_search( $key, $fields_slugs, true );
$field_options = false !== $field_key && ! empty( $form_fields[ $field_key ]->raw['options'] )
? wp_list_pluck( $form_fields[ $field_key ]->options, 'label', 'value' )
: array();
if ( ! isset( $field_options[ $field_value ] ) && isset( $_POST[ $key ] ) ) {
return sanitize_text_field( $_POST[ $key ] );
}
}
}
}
return $content;
},
10,
3
);
that’s my codes
]]>We use Simple Cloudflare Turnstile, so if you are not able to integrate Turnstile additionally in Integration tab, your validator can check just a conditions “Simple Cloudflare Turnstile” plugin is installed and active, and in the contact form shortcode [cf7-simple-turnstile] added.
]]>Thanks,
Ady
Is there someone here to help me with creating a validation on a text field (Elementor form). Can’t use the date pricker. Need an outcome like: Day/Month/Year, so 12/08/1980.
So need a PHP function with a regular expression (preg_match).
]]>I added some custom product fields form in my single product page. But whenever the user missed out to input a required field and go for “add to cart” button, no validation notification is coming up to mention the same. I tried the same page with different theme, then the notification is working. But if i use the woostify theme, no notification.
I am using free version of Woostify.
]]>