Skip to content

Conversation

@JasonHoffmann
Copy link
Contributor

This contains all the functionality for Flexible fields, including

  • A render function that dynamically creates groups on creation, and then slots them in one by one, overwriting the values of each as they are rendered
  • A sanitize function that dynamically creates groups on save, pairs it with data from the $_POST request and then applies sanitization callbacks to each field.
  • Javascript that handles removing and sorting rows, making sure to change attributes whenever a row is changed
  • Some basic helpers throughout

The next step will be to identify any hanging bugs, add proper documentation, and separate out functions from one big final to a few smaller ones.

JasonHoffmann and others added 30 commits June 23, 2017 14:58
$index = $group->args['array_key'];
$field_key = $field_id . '[' . $index . ']';

echo '<div class="cmb-row cmb-flexible-row" data-groupid="' . esc_attr( $group_name ) . '" data-groupindex="' . absint( $index ) . '">';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer it if we could break out of PHP here, rather than repeating echo after echo. 🌴

@JasonHoffmann JasonHoffmann mentioned this pull request Jul 5, 2017
@JasonHoffmann
Copy link
Contributor Author

Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants