The Advanced Forms add-on allows you to save the values of your custom fields directly in the user data, rather than in the booking data, so that customers do not have to enter it with each reservation.
Edit user custom fields
It was possible to enter them by the customers when they register, and by the administrator from Users > All users > the user. But the customers themself could not change the values afterwards.
Now you can give your customers the ability to edit their custom field values at any time.
With a shortcode
The [bookingactivities_user_custom_fields]
shortcode displays a form that allows the customers to edit the custom field values associated with their account.
By default, this form will only display fields having a value associated with the user currently logged in. But you can configure this shortcode to display custom fields of your choice.
Attribute | Expected value |
---|---|
fields |
Custom fields names (comma separated). Default: (fields having a value only). |
delete_default |
1 to display a field allowing the customer to delete the data used to prefill the booking forms.0 to hide this field.Default : 1 . |
enable |
1 to display only the active (non-deleted) custom fields.0 to hide them.Default: 1< /code>. |
user_id |
The desired user ID (integer). Default: (current user). |
form_wrapper |
1 to display a form.0 to display only the fields.Default: 1 . em> |
redirect_url |
URL to redirect the user to after submitting the form (only if form_wrapper = 1 ).Default: (no redirect).< /em> |
With WooCommerce, from the customer area
Go to Booking Activities > Settings > WooCommerce tab > "Custom fields in My Account" to define the custom fields whose value the customer can modify directly from their account ("Account details" tab).
You can choose
- "None": do not allow customers to edit custom field values associated with their account
- "Custom fields previously filled in" (default): Shows fields with a value only
- Custom selection: click on the "+" icon next to the select box to choose the custom fields to display
Pre-fill booking forms
Along the same lines, a new field has been added: "Save custom field values".
It's a checkbox that you can add to your booking forms. If customers check it before confirming their reservation, the form will be pre-filled with the same information the next time they want to make a reservation via this form.
To replace this information, simply make a new reservation with other information (and check that box).
To delete this information, the customer will find an option "Delete the default values with which the booking forms are automatically filled" in the form displayed by the shortcode [bookingactivities_user_custom_fields]
, or with WooCommerce, in the "Account Details" page (see paragraph "Edit user custom fields" above).