In this document:
Description
WordPress Filter that enables copying hidden fields from Gravity Forms to SSA.
Learn more about how our Gravity Forms integration works when it comes to passing fields.
Placement
This code should be placed in the file of your custom plugin.
Source Code
This filter is located in the SSA_Gravityforms::book_appointment_after_form_submission()
function in class-gravityforms.php.
Usage
add_filter( 'ssa/forms/gravity/copy_hidden_fields_to_ssa', '__return_true' );
Parameters
$should_copy boolean
Identify whether to copy or not where the default is false.
$form_id int
The ID of the Gravity form.
$gravityform_hidden_field_id int
The ID of the current field in the Gravity form.
$gravityform_hidden_field
The current field in the Gravity form.
$entry_id int
The ID of the entry.
$gravityform_appointment_field_id int
The ID of the Gravity form appointment field.
Example – Copy All Values
// copy all values from hidden Gravity Forms fields to SSA appointments
add_filter('ssa/forms/gravity/copy_hidden_fields_to_ssa', '__return_true');
add_filter('ssa/forms/gravity/copy_hidden_fields_to_ssa', 'ssa_custom_allow_specific_field', 10, 3);
function ssa_custom_allow_specific_field($should_copy, $form_id, $field_id)
{
if (123 == $form_id && 456 == $field_id) {
return true;
}
return $should_copy;
}
Related Guides
-
Developer Settings
-
New Booking App
-
ssa/appointments/customer_information/get_defaults Filter
-
ssa/templates/get_template_vars Filter