Gravity Form submission on behalf of other person
$10-30 USD
Paiement à la livraison
Hi!
I have this code that is placed in [login to view URL] and will add to a gravity form a drop-down menu with the list of currents WordPress users.
What the developer has to do is that when I select a user of the dropdown, the gravity form submission is done in the name of the selected user.
This means that the gravity form entry in the backend should appear as created and submitted by the user I selected from the drop-down.
Conditions of this project:
- No environment or ftp or WordPress will be given
- Code must be sent to me in order to test and place and release funds.
- Budget is 10USD, if you bid more you will not be considered.
- Automatics bots go away.
Code:
add_filter("gform_pre_render", "populate_userdrop");
//Note: when changing drop down values, we also need to use the gform_admin_pre_render so that the right values are displayed when editing the entry.
add_filter("gform_admin_pre_render", "populate_userdrop");
function populate_userdrop($form){
// echo '<pre>'; print_r($form)
$form_id = $form['id'];
if($form_id==122){
$items = array();
$metas = get_users();
if (is_array($metas))
{
foreach($metas as $meta) $items[] = array("value" => $meta->display_name, "text" => $meta->display_name);
}
foreach($form["fields"] as &$field)
if($field["id"] == 1){
$field["choices"] = $items;
}
return $form;
}else{
return $form;
}
}
Nº du projet : #17349608
À propos du projet
Décerné à:
Hello I have checked your project descriptions . I have done almost according to you in this project . Relevant Skills and Experience Php,jQuery,Mysql,Wordpress Proposed Milestones $15 USD - complete project within h Plus
5 freelances font une offre moyenne de 18 $ pour ce travail
Hi, I am a CS student that is very new to Freelancer. I would love to help you with your code. Look forward to hearing back. Thanks.