WordPress.org

Support

Support » Miscellaneous » [Resolved] Custom Post Type Meta Box Field won't save it's data?

[Resolved] Custom Post Type Meta Box Field won't save it's data?

  • I recently added an Event Post type that has multiple Custom Meta input fields. I tried adding a textarea to the meta box and it shows up perfectly fine. BUT, when I save the post after filling in the textarea box, the data from ONLY the textarea disappears.

    I’d have to continuously type in the information all over again after saving or making changes..

    What can I do to fix this?

    Here is a large portion of the events post type//
    http://pastebin.com/KTakDR6m

Viewing 2 replies - 1 through 2 (of 2 total)
  • Chris Olbekson

    @c3mdigital

    Level 12 Bug Squasher & Forum Moderator

    textareas do not have a value attribute. Change the output of that field to:

    $ret .=
    '<p>
            <label class="events">Information: </label>
             <textarea name="event_info" rows="5" cols="65" class="event-info">'.get_event_field( "event_info" ).' </textarea>
    </p>';

    Thank you SO much!!! Chris ! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Custom Post Type Meta Box Field won't save it's data?’ is closed to new replies.