• I have a form with multiple fields that will submit to a custom post type, and would like to add some html inside. I am not sure how to approach it. Using my code below, it will submit the field with the name “description” to post_content. What I would like to do is have it displayed like this when Submitted.

    Description : (Description Here)

    although with the current code, it only shows the “Description” input.

    How Can I add “Description:” before the processed field into this array?

    $new_post = array(
    	'post_title'    => $title,
    	'post_content'  => $description,
    	'post_parent' => 599,
    	'post_status'   => 'publish',
    	'post_type' => 'topic'
    );
    <p class="question"><label>Description<input name="description" class="text" id="text" required tabindex="1" type="text">

    Also, if I wanted to add a break after “description” and say another form input like First Name, how could I add it to the ‘post_content’ => $description, ?

    Thanks!

  • The topic ‘Formatting post_content form submission’ is closed to new replies.