Working with repeaters

Dynamically set maximum allowed rows on a repeater field on form render How append new rows to an existing repeater field

Phil Kurth Phil Kurth

Prefilling form fields

You may choose to prefill form fields on form render using a variety of methods. Available methods Shortcode argument Due to the potential complexity of field values and shortcodes lacking support for complex data structures, it is not currently possible to prefill values via the shortcode. Instead, it is best to use the advanced_form() function […]

Want it delivered fresh? You know what to do…

We never share your data.
Read our Privacy Policy

Creating and editing posts

A very common use case for ACF forms on the front end is to allow users to create and edit posts. Some examples of this include: User submitted blog posts Allowing users a single page to act as their profile Bespoke support ticket system where users can submit ticket posts A front end job board […]

Registering forms programmatically

You may choose to register your forms programmatically rather than using the admin interface. This is useful if you want to create forms dynamically, or if you want to embed forms into the project via a theme or plugin. Doing so also provides the benefit of being able to version control your forms. To create […]

Customizing request authentication

API keys are tokenised with each request using a time-based tokenisation algorithm. This ensures that the API key is only valid for a maximum of two minutes (using UTC times). API tokens are sent via the X-ACF-Remote-Sync-Token request header. Changing the request header name You may change the request header if you wish using the […]

Phil Kurth Phil Kurth

Working with repeater fields

By default, the plugin ignores repeater fields allowing their data to pass through to ACF for storage in core metatables. This is to maintain consistency after updating to version 1.1. You may enable repeater support using either the plugin’s settings panel, or a WordPress filter and then further configure the plugin — using WordPress filters […]

Phil Kurth Phil Kurth

Removing support for fields

You can remove fields from the supported field list, if you need to. When doing so, you have the ACF field array to evaluate, so you have a good degree of flexibility: <?php /* * Removing fields from the ‘supported fields’ list. This affects table definition * generation and can go in your functions.php file […]

Running custom actions after a table is updated or created

As of version 1.1, it is possible to run custom handlers during the table update process. The ability to run processes right after schema update opens up a number of possibilities including: Custom index creation. Custom logging/notification. Custom data migration handlers. Table field format modifications that might not be possible due to limitations in WordPress’ […]

Running custom actions after a table value is updated

You may use the acfcdt/custom_table_value_updated action hook to run custom functionality after a field value has been saved in a custom database table. A common use case could be to delete core meta table values as they are saved in a custom table. e.g; add_action( ‘acfcdt/custom_table_value_updated’, function ( $value, $post_id, $field_array ) { // Delete […]

Overriding default field value encode and decode behaviours

When storing a value in a database table, the value cannot be an array or object as these will result in database errors. To protect against this, WordPress’ core meta system attempts to serialize all values before storing them in the core tables. This allows us to pass non-scalar values (arrays, objects) to functions such […]

1 2 3 4

Good dev stuff, delivered.

Product news, tips, and other cool things we make.

We never share your data. Read our Privacy Policy

© 2016 – 2023 Hookturn Digital. All rights reserved.