Dynamic population of front end form selectors

Support MB Frontend Submission Dynamic population of front end form selectors

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #48620
    admin@dantianhealth.com.au[email protected]
    Participant

    I'm building a WordPress-based attendance system for courses using MetaBox and TutorLMS. Here's what I currently have set up:

    I have a CPT called attendance (using custom table) with the following custom fields:

    * course_id (a post field selecting from the courses CPT)
    * tutorial_date (a select field)
    * students_present (a checkbox_list field showing enrolled students)

    The courses CPT (created by TutorLMS) has a repeatable MetaBox Custom Field group tutorial_list with:

    * tutorial_date
    * tutorial_location

    Student enrolments are stored by TutorLMS as custom posts of type tutor_enrolled, where:

    * post_author is the user ID
    * post_parent is the course ID

    What I want:
    When a user selects a course_id in the attendance form using metabox fronted submission:

    1. The tutorial_date dropdown should be dynamically populated with dates and locations from that course’s tutorial_list field.
    2. The students_present checkbox list should be dynamically populated with the enrolled students for the selected course.

    I need help in understanding the best way to dynamically populate that on the front end form and ensure that it is then saved to the database

    #48622
    PeterPeter
    Moderator

    Hello,

    Thanks for reaching out.

    Currently, Meta Box doesn't support populating data for a field based on another field value like that. You can try to create some custom JavaScript code to populate data dynamically.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.