tonlogicdevworks
Forum Replies Created
-
AuthorPosts
-
tonlogicdevworksParticipant
Thank you!
tonlogicdevworksParticipantDo you have any already available?
tonlogicdevworksParticipantAwesome! Thanks!
tonlogicdevworksParticipantWe have made progress! But how do we separate the fields in the message box? Meaning we would like each field to get its own line
add_filter( 'fep_form_fields', function( $fields ){ $fields['cus_fep_textbox1'] = [ 'type' => 'text', 'where' => 'shortcode-newmessage', 'priority' => 12, 'label' => 'Quote Number', ]; 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 ( $cus_fep_textbox1 = fep_get_meta( fep_get_the_id(), 'cus_fep_textbox1', true ) ) { echo 'Quote Number: '; echo esc_html( $cus_fep_textbox1 ); } }); add_filter( 'fep_form_fields', function( $fields ){ $fields['cus_fep_textbox2'] = [ 'type' => 'text', 'where' => 'shortcode-newmessage', 'priority' => 13, 'label' => 'Job Reference #', ]; return $fields; }); add_action( 'fep_action_message_after_send', function( $message_id, $message, $new_message ){ if ( ! empty( $message['cus_fep_textbox2'] ) ) { fep_add_meta( $message_id, 'cus_fep_textbox2', $message['cus_fep_textbox2'], true ); } }, 10, 3); add_action( 'fep_display_after_message', function(){ if ( $cus_fep_textbox2 = fep_get_meta( fep_get_the_id(), 'cus_fep_textbox2', true ) ) { echo 'Job Reference #: '; echo esc_html( $cus_fep_textbox2 ); } });
tonlogicdevworksParticipantStill stumped.
The field label “Quote Number” is not showing or coming through in a message…add_filter( ‘fep_form_fields’, function( $fields ){
$fields[‘cus_fep_textbox1’] = [
‘type’ => ‘text’,
‘where’ => ‘shortcode-newmessage’,
‘priority’ => 12,
‘cb_label’ => ‘Quote Number?’,
];
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_checkbox’, $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 ‘Quote Number’;
}
});tonlogicdevworksParticipantWe are not having much luck with this. I would suggest this addition to keep track of messages better in the user area, its confusing to have the avatars and no info to know what message is what.
tonlogicdevworksParticipantok we resolved the fields on the frontend form but the added fields do not appear in the message when sent.
add_filter( ‘fep_form_fields’, function( $fields ){
$fields[‘cus_fep_textbox1’] = [
‘type’ => ‘text’,
‘where’ => ‘shortcode-newmessage’,
‘priority’ => 12,
‘label’ => ‘Quote Number’,
];
return $fields;
});
add_filter( ‘fep_form_fields’, function( $fields ){
$fields[‘cus_fep_textbox2’] = [
‘type’ => ‘text’,
‘where’ => ‘shortcode-newmessage’,
‘priority’ => 13,
‘label’ => ‘Job Reference Number’,
];
return $fields;
});tonlogicdevworksParticipantwe have tried this but it is not working on the front end shortcode form…
add_filter( ‘fep_form_fields’, function( $fields ){
$fields[‘cus_fep_textbox1’] = [
‘type’ => ‘text’,
‘where’ => ‘shortcode-newmessage’,
‘priority’ => 22,
‘cb_label’ => ‘Quote #’,
];
return $fields;
}); -
AuthorPosts