Support

Account

Home Forums ACF PRO Getting data from JSON – ACF Plugin Reply To: Getting data from JSON – ACF Plugin

  • It would depend on the complexity of the fields involved.

    Could something like this be done? Yes.

    The basics would be to:
    1) Created an acf/save_post filter
    2) Check to see if the radio button is set to JSON
    3) Get the value of the JSON field
    4) decode the JSON, Import the data using update_field() calls using field keys
    5) Update the radio to “Manual”

    The problem here is in the importing, depending on your field complexity and that you need to use field keys because I’m assuming that this is for a new post that does not have values in all the other fields already.