Simple Fields
Adding a new repeatable field entry using script (1 post)

  1. JimDestruct
    Posted 4 years ago #

    Hi, I am stuck with a small issue of adding a repeatable entry via a function on the front end of the website.

    For example if I wanted to add content for a single field I would do something like this:
    add_post_meta(get_the_id(), '_simple_fields_fieldGroupID_32_fieldID_3_numInSet_0', "test");

    but when I do the same for a repeatable field ie:

    add_post_meta(get_the_id(), '_simple_fields_fieldGroupID_32_fieldID_1_numInSet_4', "test");
    add_post_meta(get_the_id(), '_simple_fields_fieldGroupID_32_fieldID_2_numInSet_4', "test");
    add_post_meta(get_the_id(), '_simple_fields_fieldGroupID_32_fieldID_3_numInSet_4', "test");

    It does not show up - I think there is a setting you have to change in the options that governs how many there are in the group but I don't know how to alter this when doing the above... any ideas anyone?



Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic