hamed
Forum Replies Created
-
AuthorPosts
-
hamedParticipant
On the page where the content of the sent message can be seen.
July 20, 2022 at 5:37 pm in reply to: List the writings of an author on the site inside a selection form #44729hamedParticipantYes,
Each author has her own page where the titles of the her articles written on the site, can be seen.hamedParticipantDear Shamim,
Thank you very much for the help you give me.
To add the date selection field, I added the following code, but nothing is displayed.Can you tell me what I should change?
add_filter( ‘fep_form_field_output_date’, function( $fields ){
$fields[‘cus_fep_test’] = [
‘type’ => ‘date’,
‘where’ => ‘newmessage’,
‘priority’ => 12,
‘label’ => ‘Test’,
];
return $fields;
});add_action( ‘fep_action_message_after_send’, function( $message_id, $message, $new_message ){
if ( ! empty( $message[‘cus_fep_test’] ) ) {
fep_add_meta( $message_id, ‘cus_fep_test’, $message[‘cus_fep_test’], true );
}
}, 10, 3);add_action( ‘fep_display_after_message’, function(){
if ( $cus_fep_test = fep_get_meta( fep_get_the_id(), ‘cus_fep_test’, true ) ) {
echo ‘<div>Test : ‘; echo esc_html( $cus_fep_test ) . ‘</div>’;
}
});hamedParticipantthank you so much.
that was perfect.hamedParticipantI saw this page but I don’t understand what to do.
I want to display the content of the new fields I added to the form in the body of the email.
For this, which part of the own email tag codes should I change?hamedParticipantThank you for your quick response.
problem solved.
Email sending was blocked from the server, so I activated it.I use some additional fields in the form.
I want to display the details of these fields in the email received by people.
What should I do?Attachments:You must be logged in to view attached files.hamedParticipantI found the solution.
I am writing the solution here so that if anyone needs it, it can be used:add_filter( ‘fep_form_fields’, function( $fields ){
$fields[‘cus_fep_textbox41’] = [
‘type’ => ‘select’,
‘where’ => ‘newmessage’,
‘priority’ => 12,
‘label’ => ‘Title’,
‘options’ => array(
‘test1’ => __( ‘Test1’),
‘test2’=> __( ‘Test2’),
),
];
return $fields;
});
add_action( ‘fep_action_message_after_send’, function( $message_id, $message, $new_message ){
if ( ! empty( $message[‘cus_fep_textbox41’] ) ) {
fep_add_meta( $message_id, ‘cus_fep_textbox41’, $message[‘cus_fep_textbox41’], true );
}
}, 10, 3);
add_action( ‘fep_display_after_message’, function(){
if ( $cus_fep_textbox41 = fep_get_meta( fep_get_the_id(), ‘cus_fep_textbox41’, true ) ) {
echo ‘<div>Ville : ‘; echo esc_html( $cus_fep_textbox41 ) . ‘</div>’;
}
}); -
AuthorPosts