Home › Forums › Front End PM PRO › Additional Message Field › Reply To: Additional Message Field
January 7, 2019 at 6:50 pm
#20493
David
Participant
Ok, have got to this stage which has added a text box but not sure how to echo the info from the text box into the message? Is it possible to replace the word ‘hello’ below with the details entered into textbox1?
add_filter( 'fep_form_fields', function( $fields ){
$fields['cus_fep_textbox1'] = [
'type' => 'text',
'where' => 'reply',
'priority' => 22,
'label' => 'Start Point',
];
return $fields;
});
add_action( 'fep_action_message_after_send', function( $message_id, $message, $new_message ){
if ( ! empty( $message['cus_fep_textbox1'] ) ) {
fep_add_meta( $message_id, 'cus_fep_textbox1', $message['cus_fep_textbox1'], true );
}
}, 10, 3);
add_action( 'fep_display_after_message', function(){
if ( fep_get_meta( fep_get_the_id(), 'cus_fep_textbox1', true ) ) {
echo hello;
}
});