Please teach me how to set the placeholder on Description.

Solved2.44K viewsGeneral#Anspress #placeholder
1

Hi,
I wanna insert the placeholder like below on Description.
Please teach me how to do that.

Question is closed for new answers.
Selected answer as best
1

You may try to insert this in your child theme function.php. However, its input type will be replaced by textarea.

function my_custom_title_field( $form )
{
$form['fields']['post_content'] = array(
'label' => __( 'Description' ),
'type' => 'textarea',
'attr' => array(
'placeholder' => '[YOUR_PLACEHOLDER]',
),
);
return $form;
}
add_filter( 'ap_question_form_fields', 'my_custom_title_field' );

Posted new comment

Thanks!
If the input type is still editor, does that mean I can’t insert the placeholder?

You may try wp_editor() if you want to keep the input as an editor
https://developer.wordpress.org/reference/functions/wp_editor/

I am still trying to implement this function, if you got the answer, please share it with me.

I understood. Thank you for teaching me!

You are viewing 1 out of 1 answers, click here to view all answers.