Lukket

Formidable Forms custom validation

Hi,

I need to have a custom validation for my formidable forms. I found this code [login to view URL] that validates to make sure a combination of 2 fields is unique and otherwise does not allow submission. I need to have it so that it validates THREE fields to be unique.

I will pay for 1 hour of work as you quote in your application.

Please only apply if you have extensive knowledge of formidable forms and can help me straight away. Do not apply if you simply think you can kinda figure it out. I can provide you with my form export to test at your end or maybe you can just see the error in my code below and correct it for me.

I have adjusted Formidable code to below but it does not work. I does not pick up that there is an entry already that matches all 3 conditions and continues to allow the user to submit an entry:

add_filter('frm_validate_field_entry', 'two_fields_unique', 10, 2);

function two_fields_unique( $errors, $posted_field ) {

$first_field_id = 6; // change 125 to the id of the first field

$second_field_id = 8; // change 126 to the id of the second field

$third_field_id = 17; // change 126 to the id of the second field

$current= current_time("timestamp");

$todaydate = date('Y-m-d', $current);

if ( $posted_field->id == $first_field_id ) {

$entry_id = isset( $_POST['id'] ) ? absint( $_POST['id'] ) : 0;

$values_used = FrmDb::get_col( 'frm_item_metas',

array( 'item_id !' => $entry_id,

array( 'or' => 1,

array( 'field_id' => $first_field_id, 'meta_value' => $_POST['item_meta'][ $first_field_id ] ),

array( 'field_id' => $second_field_id, 'meta_value' => 'Pending' ),

array( 'field_id' => $third_field_id, 'meta_value' => $todaydate ),

)

), 'item_id', array('group_by' => 'item_id', 'having' => '(COUNT(*) > 1)' )

);

if ( ! empty( $values_used ) ) {

$errors[ 'field'. $first_field_id ] = '<b>No multitasking!</b> <br>Complete your active task if you want to add another one.';//.implode(" ",$values_used);

//$errors[ 'field'. $second_field_id ] = 'You have already selected that option';

}

}

return $errors;

}

Evner: PHP, WordPress

Om klienten:
( 69 bedømmelser ) Port Vila, Vanuatu

Projekt ID: #33716621

32 freelancere byder i gennemsnit $81/timen for dette job

phpMaestro

Hello there, We are here to provide you best development and designing services. We are a team of full stack developers having 14+ years of experience in designing and developing websites/web applications on differen Flere

$20 USD / time
(376 bedømmelser)
10.0
(223 bedømmelser)
8.1
evgendob

Hello. WordPress development expert ready to help you with a project. I have more than 400 good reviews and more than 11 years of development experience behind, so all job will be done with the best quality and timefra Flere

$15 USD / time
(661 bedømmelser)
8.3
(182 bedømmelser)
8.2
(58 bedømmelser)
7.8
(243 bedømmelser)
7.4
mmadi

Hello Polina H., Yes I have 10 years of experience in PHP, WordPress. can you please start chat and give me more details. Thank you

$12 USD / time
(50 bedømmelser)
7.1
(111 bedømmelser)
7.3
devstart1234

Hi, We are a team and have checked your requirement 'Formidable Forms custom validation'. We are ready to sign NDA, If required. Websites: [login to view URL] [login to view URL] https://get Flere

$8 USD / time
(330 bedømmelser)
7.6
smilemittal181

Hello, I can a custom validation for your formidable forms. I am a PHP expert and have worked on many sites in technologies like E-commerce, Wordpress, Woocommerce, Shopify, HTML5 and also PHP frameworks like Laravel, Flere

$15 USD / time
(213 bedømmelser)
7.4
divumanocha

***WORDPRESS EXPERT*** Hello, Warm Greetings! I have checked your requirements for the project. I found my skills are relevant to your project. I have more than 6 years of experience in this field and I am highly pro Flere

$12 USD / time
(80 bedømmelser)
7.0
maamekal

Hello, 7+ years with User Experience Design, Website Design, App Designer, Graphic Design and Figma. I'm a India-based web developer specializing in high-quality WordPress development and interested in building a good Flere

$12 USD / time
(162 bedømmelser)
7.0
BitLabs

Hello, I have gone through your outsourced requirements " Formidable Forms custom validation " and have analyzed that I have right skills ( PHP WordPress ) to execute your esteemed project. I will complete your p Flere

$12 USD / time
(136 bedømmelser)
6.8
gauravmittal1989

Greetings Client I have gone through your project description. I would like to express my genuine interest to be associated with you. I would like to mention that I am a professional having experience in the field of Flere

$20 USD / time
(143 bedømmelser)
7.1
ArkssTech

Hey Manager!! We checked for your project and interested in your project. Project: Formidable Forms custom validation I am skilled full stack engineer with skills including WordPress and PHP.
 I have done several com Flere

$21 USD / time
(49 bedømmelser)
6.7
bestphpjobs

Hi your project detail make all sense, thank you for writing proper details, I will work on that form add proper validation and make it work accoring to your need. Thank You

$8 USD / time
(232 bedømmelser)
6.6
(18 bedømmelser)
6.6
gauravsachdeva87

Hello, I am a Full-Stack Web developer and designer with 6+ years of experience in all aspects of web design and development. I am working on WordPress, Joomla, Shopify, Woocommerce, Laravel, CodeIgniter, HTML5, CSS3, Flere

$10 USD / time
(40 bedømmelser)
6.3
(72 bedømmelser)
6.4
anastasbestdew

Hello As a PHP full stack developer, I have been working on 300+ Wordpress projects for the past 10 years. Would you check the following WP websites I developed? [login to view URL] [login to view URL] https://www.m Flere

$15 USD / time
(11 bedømmelser)
5.1