Previous Section | Next Section
...
- Click Rules in the Guided Designer Navigation bar at the top of the page.
- Click Create a new rule.
- Change the name of the rule to: Initialize form
Click on the Rule Run Builder button.
Click Next to go to the Action wizard.
The first action appears by default. If needed, click the Add Action button on the top right of the Action Wizard
Select TodaysDate from the first dropdown. TodaySDate is the Name of the Date control at the top of the form. If your control is named something else, select that control from the dropdown.
Select to from the second dropdown
Type today in the Expression field and click on the today function when it displays in the dropdown
Click Finish.
Save and Test. Now, when the end user first starts using the form, the Date control at the top will be set to today's date. No need for the user to type it in.
Expand title Click here to see this rule in the Visual Rule Builder
...
Save and Test your form. Now, when the user selects an item, the price for that item will be displayed.
Info | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
frevvo rules also support JS custom code.
|
...
- Click Form in the Guided Designer navigation bar to return to the form. In the Order Items table, select the Subtotal column by clicking on the header. In the Properties panel, uncheck Enabled. The entire column is grayed out.
- Go back to the rules editor and create a new rule. Change the name of the rule to: Calculate SubTotals
Click on the Rule Run Builder button. You will see the Condition wizard
Select your Price control from dropdown
- Select "is filled" from the Property dropdown
Click Next to go to the Action wizard.
Select your Subtotal control from the dropdown.
Select "to" from the second dropdown
Type Price * Quantity in the Expressions field
Click Finish then save and test. Now, when the end user selects the item and fills in the quantity, the Subtotal will be calculated for each row of the table
...
- Click Form in the Guided Designer navigation bar to return to the form. Click on the Grand Total control. Uncheck Enabled in the Properties panel. The field is greyed out.
- Go back to the rules editor, create a new rule and edit it. Change the name of the rule to: Calculate Grand Total
Click on the Rule Run Builder button. You will see the Condition wizard
Click Next to go to the Action wizard.
Select your Grand Total control from the first dropdown.
Select "to" from the second dropdown
Type sum in the Expressions field and click on the sum function when it displays in the dropdown
Select the Subtotal field from the dropdown then add the closing parenthesis
Click Finish then save and test.
...