• Resolved jerrythorpe

    (@jerrythorpe)


    I have created a form via your plugin, that uses 2 ACF field groups.

    I have then embedded the shortcode for that form into a normal page.

    When I go to the page, it displays the ACF fields in edit mode, as I would hope.

    I fill in the forms and click submit. I get the ‘post created’ message displayed.

    I check my posts and a new one has indeed been created. Unfortunately, if I view the newly created post, the only content it seems to have is the featured image that I selected.

    The action has been set as Create Post/Post and all of the ACF fields have been selected in the ‘save’ tab.

    Any suggestion as to what could be preventing any of the fields from being saved to the post?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    I order to help you, I’ll need more information. Can you please share some screenshots of your Dynamic Form configuration (all Post Action tabs, whole page ideally), and also a screenshot of your Field Group UI (whole page)?

    Regards.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Note: Also, can you enable the ACF Extended: Developer Mode, and check the DB meta that are actually saved on the created post?

    Thanks.

    Regards.

    Thread Starter jerrythorpe

    (@jerrythorpe)

    Hi,

    Thanks for responding so quickly Konrad, here’s everything except the developer mode – I’ll dig up those results tomorrow. I don’t think that is the problem though as the fields are showing in the post when in edit mode, just not in view mode.

    The ACF fields appear if I go to the page with the embedded short code / ACFE form in vidw mode. Clicking submit creates the new post.

    If I go into the post in edit mode, I see the ACF field values. If I go into it in view mode, I only see the featured image.

    Dynanmic form settings

    https://photos.app.goo.gl/FVSoDyZPiYUc5DVt6
    https://photos.app.goo.gl/tVNterA4v6CXdcPP7
    https://photos.app.goo.gl/vLtQgExpUqFqLyXv9
    https://photos.app.goo.gl/QXf9xCKv78SKzepC9
    Action after form submit
    https://photos.app.goo.gl/txxREkSHPuSNERF88

    Field group (there are two, this is the first). Note that there is a repeater field in this form too.

    https://photos.app.goo.gl/6reJbarNyXRhi3yG9

    Page with embedded acfe form, view mode.

    https://photos.app.goo.gl/KHn2zbRH9F16iPPE7

    Page with embedded acfe form, edit mode. Fields all look ok.

    https://photos.app.goo.gl/CcS8RD6t1JCgcSUt8

    Resulting post , edit mode. All of the entered data seems to be showing correctly.

    https://photos.app.goo.gl/f2p9uWqwUc1np6Qh8

    Resulting post , view mode. Note that only the featured image is now showing.

    https://photos.app.goo.gl/HS961iKbPBBfryuy7

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the very detailed report and screenshots! Okay so the problem is pretty simple, you need to work on the display of the “Single Dog” page, as all ACF data are saved here. So you should now start to customize your single-dog.php file and use get_field() functions and such.

    I saw that you enabled the “Load Values” setting in your “Create Dog” form, but there is no value to load here, since you’re on the “Create a Dog” Page which has no ACF fields. Remember, ACF Fields are saved and displayed on the Single Dog pages. You can disable that setting in your form, since it has no effect.

    To make it more clear, here is your setup:

    +---------------------------------------------------+
    |         Post Type: Page - "Create a Dog"          |
    +---------------------------------------------------+
    | [acfe_form form="create-a-dog"]                   |
    | Create a page of Post Type "Dog", called "Boxer"  |
    +---------------------------------------------------+
    
    +------------------------------+
    |   Post Type: Dog - "Boxer"   |
    +------------------------------+
    | [Here is where ACF data are] |
    | get_field('gender');         |
    | get_field('colour');         |
    | ...                          |
    +------------------------------+
    

    Hope it helps!

    Regards.

    Thread Starter jerrythorpe

    (@jerrythorpe)

    Hi Konrad,

    Thanks for replying. So, just to double-check my understanding; if I create a form in ACF Extended, any ACF custom field groups/fields that I include in that form will be written to the post.

    However, the values of those groups/fields will not actually be visible on the post unless extra code is added to te single.php template to display them?

    Code for some fields (e.g. title, content, featured image) is already included in the single.php template, so those fields and only those fields will display by default?

    Is my understanding correct?

    If so, is there a standard block of code that can be added to single.php that will display all ACF fields that have been stored in the post in a nice format, without repeating any fields that are displayed by default in the theme?

    What happens if my users have edit roles and click ‘edit’ on the post. Will they be able to see and edit the ACF fields or will they also only see and be able to edit the default single.php fields?

    If the latter, is there a standard block of code that can be added to single.php to allow all ACF fields that have been stored in the post to be displayed and edited in an appropriate format, without repeating any fields that are displayed by default in the theme?

    Sorry for all the questions ??

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Sorry for the late answer. Yes you’re understanding it right. There is a difference between values saved in DB, the admin view and the actual front-end.

    Unfortunately there’s no such thing as “Block to display all values on front-end”. Developers have to display them by themselves. You must understand that ACF, while having some nice UI/UX improvements, is also quite developer-oriented.

    I would suggest to look in the ACF documentation or search for tutorials online to understand how values are working with ACF, and how they can be displayed on the front-end. Otherwise you may try to approach a WordPress developer which could help you with all those questions.

    Sorry for the evasive answer, but we’re kinda out of the scope of plugin here.

    Hope it helps!

    Have a nice day.

    Regards.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Odd problem when reviewing a post created by ACFE’ is closed to new replies.