Adding a Role-based Option for the Commerce Item Fields
Institutions can associate a role with the Commerce Item Field and collect additional information, such as the Company Name and Description, from registrants who have purchased a specified quantity of items.
To add roles to the Commerce Item Field:
- Click the Manage Category dropdown and Add New Field in the Build Form Mode.
Note: Role can also be associated with the existing Commerce Field Items by editing the field. - On the Add New field window, click the Commerce Field dropdown and select the Commerce Item Field option.
- The newly added option Associate a Role with this Field displays, select the option.
- Select the price options and enter a value. For example, select Single Price and enter a value $10.
- Click the Manage Field Role link.
- A window opens where you can add the parameters.
- Enter the Role Display text, add the operator (=, = or >, or >), the value, and then click Save. For example Equal to 20 Quantity.
- Add New Step from the Manage Form dropdown and create the Fields based on the required information. For example Field 1: Company Name and Field 2 Company Description.
- On the added step settings, under Step Audience, select Role, the Role Display Text of the Commerce Item Fields, and click Save.
Commerce Amount Field
To add roles to the Commerce Amount Field:
- Access the Build-form mode.
- Edit the field created in Step #1 by hovering over it and clicking the edit field icon.
- Add a new role to the field by selecting the option from the Add New Role dropdown, choose a condition and values (e.g., Equals, Yes), and save the role.
- Go to Manage Form and click Add Step and give it a name, which should take you to that step of the form.
- Go to Manage Category and add existing field and add any existing text field (e.g., Company Name).
- Edit step settings on Manage Category Step Settings, and select the role created in Step #3 for the step.
- Open the Donation campaign form in the front end for any member.
- Enter all required information on the form, and select the value "Yes" for the new instance field created in Step #1 (e.g., the schedule time checkbox should be selected and all the required fields should be entered).
- Click the Save and Continue button, which should land the user on step 2 of the form since the condition of role in the instance field matches the value "Yes."
- Enter any value into the step field and hit the Save and Continue buttons. The user should land on the Billing page and be able to complete the transaction.