Custom Fields
Re-Envisioned
Support MB Frontend Submission Need advice with frontend forms

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 2 months, 1 week ago.

  • Creator
    Topic
  • #15263

    netalys
    Participant

    Hi, need a little advice there : I have some custom fields on a post type.
    I want to give the users the possibility to edit those fields with a page on the frontend.
    – First question : what do you think is best : send them to the post page and display a form under the content if they are connected – or create another page on WordPress dedicated to posts edition where I pass the post_id with a querystring for example.
    – 2nd question : I’ve seen that if I display only the custom fields and save them, the title would be empty, so I have to add post_fields=”title” in the shortcode. But I don’t want them to edit the title !
    What’s your best solution ? Maybe a filter that add a readonly the the title field, or CSS to hide title field ?

    Thanks for your advices !
    Cedric.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #15266

    Anh Tran
    Keymaster

    Hi Cedric,

    1st question: It depends. Both ways work. The 1st one seems to show users the content, while the 2nd one seems to be more cleaner.

    2nd question: To show the title, but don’t want to let users edit them, you can use 2 methods:

    • Use a little PHP to output the post title (and exclude post title field from the form shortcode)
    • Or modify the template for post title field (see this guide) and add a new param 'readonly' => true to let users not able to edit it.
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.