Node entity
Form mode manager is totally integrated and fully supports Node entities.
You can also see in this Demo Tutorial
Create entities as a specific form mode
- Create a form mode (
admin/structure/display-modes/form/add/node) or programmatically withtargetEntityTypeset tonode. - Add the created form mode to a content type (article for example), go to (
admin/structure/types/manage/article/form-display) - At the bottom we have a fieldset
Custom Display settingswith our form modes listed compatible with this entity. - Check a form mode and save the form.
- Now we have two tabs at the top of the page (or a message purpose you a link in message area when we have a cached result of the page),
Defaultand the label of your form mode newly created. - With these tabs you can define a form different as
defaultto configure our form mode. - Now to use your form mode you have two ways
- Go directly to (
node/add/article/form_mode_machine_name). - Go to node overview page (
admin/content) and use the new local action link (Add node as xxxx).
- Go directly to (
Edit entities as a specific form mode
- Display a node entity like (
/node/1). - Click to edit as usual way.
- Without any specific configuration you have a new tabs level at the bottom of (
Edit) provided by default. These tabs permit you to use thedefaultform mode or our other form mode activated to this Content Type.
You can also edit our entities directly on your overviews pages with operations links you can show directly all operations allowed to see for the current user.
Advanced use cases
In advance use cases you can need to restrict access of default form mode but only for a specific form mode(s) to a specific role.
To do that you need to configure form_mode_manager to change the location of your form mode local tasks at the primary level (Same level as Edit button) and restrict access to 'default' form for a specific role for that entity. You can also totally exclude a specific form_mode to all form mode manager process/enhancements.
@see access control use cases for more information.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion