How to store variable numbers of dynamic fields per member in Memberstack? Answered

Post author
Christy Lammerink

Hi Memberstack team,

Is it possible to populate dynamic fields for a member?

For example: In my learning dashboard, I want my members to be able to fill out their students’ names. The number of students will differ for every member. Does Memberstack support something like this?

Comments

3 comments

  • Comment author
    Memberstack Team
    • Official comment

    A practical way to handle this is by using Script #198 – Add Individual Items to Data Tables. Since you want members to be able to fill out their students’ names — and the number of students will vary for each member — #198 is a strong fit because it allows you to store growing lists of values tied to a member. Each student’s name can be saved as an individual item in a Data Table, and members can add as many entries as they need without being limited to a fixed number of fields.

    That way, your learning dashboard can dynamically display the list of students for each member, and it scales naturally whether someone has 2 students or 20.

    That said, if your requirement is more complex (like storing detailed profiles for each student with multiple attributes), you might need a more advanced setup using Memberstack’s API or an external database. #198 is best when you want simple, repeatable fields or lists that grow per member.

  • Comment author
    Chukwudi

    Hi Christy,

    Yes, Memberstack does support the ability to populate dynamic fields for a member. You can achieve this through the use of Custom Fields and the Front-End API.

    For your specific scenario of allowing members to fill out their students' names in a learning dashboard, here's how you could approach it:

    1. Custom Fields/Metadata/JSON: You can set up either of these options in Memberstack to store information such as the names of students.
    2. Front-End/Backend API: You can use Memberstack's Front-End/Backend API to interact with these values. For example, you could create a form in your learning dashboard where members can input their students' names. When the form is submitted, you can use the Front-End/Backend API to update the member's custom fields with the provided information.

    Here's a high-level overview of the steps:

    • Create a form in your learning dashboard where members can input students' names.
    • Use JavaScript to capture the form submission.
    • Use the Front-End/Backend API to update the member's students' data with the submitted data.

    This may require further customization based on your specific implementation.
    Feel free to reach out if you have any further questions or need assistance with implementing this feature. We're here to help!

    0
  • Comment author
    Duncan from Memberstack

    Christy Lammerink I also recommend checking out these MemberScripts that Julian created. He’s using the JSON feature to create new “fields” and updating them.

    https://www.memberstack.com/scripts/add-item-groups-to-member-json
    https://www.memberstack.com/scripts/create-item-groups-from-member-json
    https://www.memberstack.com/scripts/add-items-to-json-groups-on-click

    What are you hoping to do with the names once they have been added by a teacher?

    0

Please sign in to leave a comment.