Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Previous Section | Next Section

...

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.


Expand
titleClick here to take a quick look at an example of the above Set Price rules in javascript.

Click Rule Code then click Edit Code. In the Rule area, type or copy/paste the following. 

Code Block
languagejavascript
linenumberstrue
for (var i = 0; i < Item.value.length; i++) {
  if (Item[i].value === 'Chevrolet') {
    Price[i].value = 125.75;
  } else if (Item[i].value === 'Chrysler') {
    Price[i].value = 118.75;
  } else if (Item[i].value === 'Ford') {
    Price[i].value = 132.75;
  }
}

...

 has a powerful Rules engine. You can perform many dynamic actions in your form including the examples above as well as many other actions like connecting to back end systems and retrieving JSON to populate form controls. The Visual Rule Builder makes it easy to create rules to show/hide parts of the form, automatically fill in user information, make controls required or optional dynamically without writing code. For more information, refer to the Rules Examples documentation.

Previous Section | Next Section