Support

Account

Home Forums ACF PRO Select option disappears after saving

Helping

Select option disappears after saving

  • I’m using json to load my fields for a plugin I’m building. I have a select module that works fine when the page is initially loaded, but once you save the page the select turns into a text input and the title and description disappear.

    To try and figure out what was going on I built the same options page in the ACF control panel, and when that is saved everything works fine. I assume it has something to do with the way the fields are being saved and recalled with the json file. Just not sure exactly what is causing it.

    JSON

    {
                "key": "field_540a0dfe55c9098",
                "label": "Data Model",
                "name": "inventory_data_model",
                "prefix": "",
                "type": "select",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "choices": {
                    "data-car": "Car",
                    "data-truck": "Truck",
                    "data-parts": "Parts"
                },
                "default_value": [
    
                ],
                "allow_null": 0,
                "multiple": 0,
                "ui": 0,
                "ajax": 0,
                "placeholder": "",
                "disabled": 0,
                "readonly": 0
            },
    

    EDIT: Added images and code.

  • Hi @nickhempsey

    Thanks for the bug report. Is the issue only occurring after saving the post? If you reload the page after a save, does the field display correctly again?

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

The topic ‘Select option disappears after saving’ is closed to new replies.