Support

Account

Home Forums Add-ons Repeater Field update_sub_field() function not working

Helping

update_sub_field() function not working

  • Hi,

    Thanks for the great plugin. Let me explain you my problem.

    I am developing a plugin which lets user to edit repeater field values from front end of the site. I send following parameters to a function using ajax.

    1. current post id
    2. edited content
    3. repeater field name
    4. row number
    5. sub field name

    and tried following methods to update a sub field value in that ajax function.

    1st Method: Inside have_rows() loop
    update_sub_field(‘sub_field_name’,’value’,’post id’);

    2nd Method: Outside have_rows() loop
    update_sub_field(array(‘repeater field name’,’row number’,’sub field name’),’value’);

    Both didn’t worked. Please correct me if did any mistake in syntax, i dont understand what is ‘caption’, given in the docs.

    http://www.advancedcustomfields.com/resources/functions/update_sub_field/

    Please help me how to update a repeater sub field from front end.

    I am using Advanced Custom Fields Version 4.3.8 and Repeater field add on version 1.1.1

    Thanks

  • Also Im using Advanced Custom Fields Version 5.0 Pro version but this method not working

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

The topic ‘update_sub_field() function not working’ is closed to new replies.