af/field/prefill_value

Prefill field values before displaying form. Can be used for example to provide dynamic default values.

<?php

function filter_args( $value, $field, $form, $args ) {
    return 'Pre-filled value';
}
add_filter( 'af/field/prefill_value', 'prefill_form_field', 10, 4 );
add_filter( 'af/field/prefill_value/name=FIELD_NAME', 'prefill_form_field', 10, 4 );
add_filter( 'af/field/prefill_value/key=FIELD_KEY', 'prefill_form_field', 10, 4 );