Hi, this will require quite a lot of programming and digging into the WPAdverts source code.
The code below will register a new field type
add_action( "init", "my_init" );
function my_init() {
adverts_form_add_field("my_adverts_field", array(
"renderer" => "my_adverts_field",
"callback_save" => "adverts_save_single",
"callback_bind" => "adverts_bind_single",
));
}
function my_adverts_field( $field ) {
return sprintf('<input type="text" name="%s", value="%s" />', $field["name"], $field["value"] );
}
Update the my_adverts_field() function to display your own HTML code for the field.
Now if you would like to use your custom field to display the Phone Number field you could use the code below
add_filter( "adverts_form_load", "customize_adverts_add" );
function customize_adverts_add( $form ) {
if( $form['name'] != "advert" ) {
return $form;
}
foreach( $form["field"] as $key => $field ) {
if( $field["name"] == "adverts_phone" ) {
$form["field"][$key]["type"] = "my_adverts_field";
}
}
return $form;
}