Support

Account

Home Forums General Issues How do I change a field value from the front end?

Solved

How do I change a field value from the front end?

  • I have created a basic WordPress site that displays a list of tasks (Custom Post Type) that need to be done.

    I have a checkbox field with the values “complete” and “incomplete”.

    The front page displays a list of tasks that are incomplete. All complete tasks are displayed on a different page.

    What I want is for a logged in user to be able to click a button under the post to change the task_status from incomplete to complete and then refresh the page.

    Is this possible?

  • Hi @deset

    You will need to write some custom code to make this work:
    1. Add some jQuery to listen for a change on the checkbox field
    2. On change, fire an ajax call to a custom PHP function
    3. In this PHP function, update the value via update_field

    Thanks
    E

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘How do I change a field value from the front end?’ is closed to new replies.