Administration¶
Webforms¶
When webforms should sync some of their fields with an existing content entity (e.g. a user) then follow these steps:
- create the webform and make sure it contains a hidden field for the ID of the entity with which you want to sync
- afterwards go to
/admin/config/webform_content_creatorand add a configuration: - Give it a name, select entity type and bundle to sync with
- Select the first option
Synchronize the creation/edition of content based on unique content field - In
Synchronization field machine nameprovide the field name which holds the ID of the entity (see above) - Save that config
- back on the overview, select
Manage fieldsfor that new config: - From the list of all entity fields select those that you want to sync
- Also select the ID field of that entity
- For each of those field select with which webform field they should be synced
From CW:
When syncing fields to a user:
- create the webform with elements (fields) that will sync to a user entity fields
- make sure it contains a hidden field for the ID of the entity with which you want to sync
- the key (field name) HAS to be "uid"
- a warning will appear: "Warning message. Please avoid using the reserved word 'uid' as the element's key."
- ignore this
- the Default value must be [current-user:uid]
- afterwards go to /admin/config/webform_content_creator and add a configuration:
- Give it a name, select the webform, the entity type "user" and bundle to sync with
- Select the first option Synchronize the creation/edition of content based on unique content field
- In Synchronization field machine name provide the field name which holds the ID of the entity - this is "uid"
- Save that config
- back on the overview, select Manage fields for that new config:
- From the list of all entity fields select those that you want to sync and match them to the webform field
- From the list of all entity fields select UID and match that to the uid webform field
- For each of those field select with which webform field they should be synced
## Book Page With Webform
In order to stay within the book after submitting a Webform embedded in a 'Book Page With Webform' entity, ensure that the Webform has a Confirmation Type setting to 'reload' not 'redirect' else once submitted, you are no longer in the Book but on the actual Webform and therefore removed from the 'book workflow.'