advancedforms / advanced-forms

WordPress plugin to create forms using Advanced Custom Fields
75 stars 14 forks source link

Last update breaks values in filter mode #49

Closed marsouin closed 5 years ago

marsouin commented 5 years ago

Hi, I hope this finds you well.

The last update prevents me from displaying values from AF()->submission when loading the form in filter mode here:

if ( af_has_submission() && ( $args['filter_mode'] || af_submission_failed() ) ) { $field['value'] = af_get_field( $field['name'] ); }

I have multiple group fields with identical subfield names, so I usually parse AF()->submission to get the values by subfield key in an array and then load those values in the advanced_form() args, but the last update breaks this and doesn't display the values at all for me. Do you have any suggestions?

I think the issue probably lies in af_get_field because the value returned for a group field has the subfield names as the array keys and not the keys. I hope I'm making sense ;)

fabianlindfors commented 5 years ago

Hi! Really sorry about the late reply, been a bit busy.

Are you saying that af_get_field doesn't return the correct values anymore?

fabianlindfors commented 5 years ago

Hi! I'll close this for now. Please re-open if you have more info for me!