Hi @amitbiswas06,
I’m glad you’re enjoying the plugin!
I can definitely supply you with some code to echo out a title and description. Form data is stored in the WordPress options table, and the description and title are attributes of the form. We don’t have a specific function like get_form_title( $form_id ).
Here is a function that will fetch the form title, just pass in the $form_id:
function yikes_mailchimp_get_form_title( $form_id ) {
$form_title = '';
if ( function_exists( 'yikes_easy_mailchimp_extender_get_form_interface' ) ) {
$interface = yikes_easy_mailchimp_extender_get_form_interface();
$form_data = $interface->get_form( $form_id );
$form_title = isset( $form_data['form_name'] ) ? $form_data['form_name'] : '';
}
return $form_title;
}
Here is a function that will fetch the form description (again, just pass in the $form_id):
function yikes_mailchimp_get_form_description( $form_id ) {
$form_description = '';
if ( function_exists( 'yikes_easy_mailchimp_extender_get_form_interface' ) ) {
$interface = yikes_easy_mailchimp_extender_get_form_interface();
$form_data = $interface->get_form( $form_id );
$form_description = isset( $form_data['form_description'] ) ? $form_data['form_description'] : '';
}
return $form_description;
}
And here is how you would call them (in this example, I’m looking at the form with an ID of 1):
$form_description = yikes_mailchimp_get_form_description( 1 );
echo $form_description;
$form_title = yikes_mailchimp_get_form_title( 1 );
echo $form_title;
Is that what you’re looking for?
Kevin.
Yes! Exactly. Thanks a lot.