Support

Account

Home Forums Feature Requests Field Group Progress Calculation

Unread

Field Group Progress Calculation

  • Hi,

    I’m attempting to put together a ‘Progress’ identifier for my front-end form field groups. i.e. A field group has 9 fields, if <3 are filled out, the button for the form is red, if <6 then orange, if all 9 are filled then button is green. (This ‘identifier’ will be saved as user_meta, and pulled through as a class attached to the button)

    I have many many Field Groups, which may change over time, so I was hoping to be able to dynamically count how many fields are in a group, see how many have a value and from that deduce a percentage of ‘completeness’.

    As the field group can have conditional fields, I can’t simply count all the fields, as some are unnecessary under conditional rules.

    I can see in the admin-ajax.php request that it seems to only validate against the visible fields by using the acf/validate_save_post action.

    Can I add a filter/action to acf/validate_save_post to count the fields that it tries to validate against? And then do a count against all with !$value?

Viewing 1 post (of 1 total)

The topic ‘Field Group Progress Calculation’ is closed to new replies.