Suljettu

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;

}

Taidot: PHP, WordPress

Tietoa asiakkaasta:
( 69 arvostelua ) Port Vila, Vanuatu

Projektin tunnus: #33716621

32 freelanceria on tarjonnut keskimäärin $81/tunti tähän työhön

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 Lisää

$20 USD / tunti
(376 arvostelua)
10.0
(223 arvostelua)
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 Lisää

$15 USD / tunti
(661 arvostelua)
8.3
(182 arvostelua)
8.2
(58 arvostelua)
7.8
(243 arvostelua)
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 / tunti
(50 arvostelua)
7.1
(111 arvostelua)
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 Lisää

$8 USD / tunti
(330 arvostelua)
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, Lisää

$15 USD / tunti
(213 arvostelua)
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 Lisää

$12 USD / tunti
(80 arvostelua)
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 Lisää

$12 USD / tunti
(162 arvostelua)
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 Lisää

$12 USD / tunti
(136 arvostelua)
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 Lisää

$20 USD / tunti
(143 arvostelua)
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 Lisää

$21 USD / tunti
(49 arvostelua)
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 / tunti
(232 arvostelua)
6.6
(18 arvostelua)
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, Lisää

$10 USD / tunti
(40 arvostelua)
6.3
(72 arvostelua)
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 Lisää

$15 USD / tunti
(11 arvostelua)
5.1