Hello, my formidable pro form has one dynamic dropdown to be populated dynamically from one of the columns of my mysql database. How do I populate formidable dynamic dropdown using your integration?
Sorry but I did not quite understand what are you trying to achieve.
Can you please explain me more and send me some example/screenshot so I can give you my suggestion.
I try to say that my formidable pro form has a dynamic drop-down field that is populated from an extra custom table inside the $wpdb. In order to do this so I use a hook into the Code Snippet plugin. Where can I enter this hook in your application to achieve this feature?
DB example:
wpdb/wp_table1
/wp_table2
/wp_my-custom-table-to-feed-drop-down
============ the hook is something similar to this where my table is pp_teachers and dropdown field ID is #100-----------
add_filter(frm_setup_new_fields_vars,frm_populate_member,20,2); // add_filter(frm_setup_edit_fields_vars,frm_populate_member,20,2);//use this function on edit too
functionfrm_populate_member($values,$field){ if($field->id==100||$field->id==733){//replace 732 and 733 with the IDs of the fields to populate global$wpdb; //the Query $the_Result=$wpdb->get_results("SELECT concat_ws(', ', last_name, first_name) as display_name FROM wp_database.pp_teachers where account_state = 'active' order by last_name, first_name;");
unset($values['options']);//break the binding of any existing content in the values array
$values['options']=array();//remove this line if you are using a checkbox or radio button field $values['options'][]="";
//the Loop if(!empty($the_Result)){ foreach($the_Resultas$a_user){ $values['options'][]=$a_user->display_name; $values['use_key']=false; } } //$values['use_key'] = true; //this will set the field to save the post ID instead of post title } return$values; }
Hello, my formidable pro form has one dynamic dropdown to be populated dynamically from one of the columns of my mysql database. How do I populate formidable dynamic dropdown using your integration?
Hi Paulo,
Thank you for your purchase.
Sorry but I did not quite understand what are you trying to achieve. Can you please explain me more and send me some example/screenshot so I can give you my suggestion.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Milan, thanks for the prompt reply.
I try to say that my formidable pro form has a dynamic drop-down field that is populated from an extra custom table inside the $wpdb. In order to do this so I use a hook into the Code Snippet plugin. Where can I enter this hook in your application to achieve this feature?
DB example:
wpdb/wp_table1
/wp_table2
/wp_my-custom-table-to-feed-drop-down
============ the hook is something similar to this where my table is pp_teachers and dropdown field ID is #100-----------
add_filter(frm_setup_new_fields_vars, frm_populate_member, 20, 2);
// add_filter(frm_setup_edit_fields_vars, frm_populate_member, 20, 2); //use this function on edit too
function frm_populate_member($values, $field){
if($field->id == 100 || $field->id == 733){ //replace 732 and 733 with the IDs of the fields to populate
global $wpdb;
//the Query
$the_Result = $wpdb->get_results( "SELECT concat_ws(', ', last_name, first_name) as display_name FROM wp_database.pp_teachers where account_state = 'active' order by last_name, first_name;" );
unset($values['options']); //break the binding of any existing content in the values array
$values['options'] = array(); //remove this line if you are using a checkbox or radio button field
$values['options'][]="";
//the Loop
if(! empty($the_Result)){
foreach($the_Result as $a_user){
$values['options'][]=$a_user->display_name;
$values['use_key'] = false;
}
}
//$values['use_key'] = true; //this will set the field to save the post ID instead of post title
}
return $values;
}
====================================================
Thank you.
Paulo
Hello Milan, my question is more related to Formidable support, not you.
I so sorry,
Paulo
Hi Paulo,
It's no problem.
If you have any more issues feel free to open a new ticket, we will gladly help.
We'd greatly appreciate it if you could take a minute and leave a review on CodeCanyon on this link. Thanks!
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables