# Forms Generator Devtools

Forms generator has a devtools that comes with it.

Devtools

# Testing the Resuming Functionality

Devtools

Before devtools you needed to "Go Back and Resume the Call" -> "Stop the Call" to check if the fields are filling correctly when the forms is resumed. With the help of the devtools you can save the current state of the form to check resuming. You can check the saved JSON in the localStorage and also by clicking "Re-initialize Form" on the devtools to see if prefilling works correctly.

# Testing the Precall Binding Functionality

Precall SS Precall Bindings

There is a "Form Precall Bindings" tab which you can use to test if the precall bindings of your current items are working correctly. Every item that has a precall binding will appear in that tab, and you can see the values coming from the precall there. You can even set the values by hand and "Re-initialize Form" to see if they prefill the fields correctly

# Testing the getParamsForSubmission

To see if your form output is correct or not, you can easily log the output of your form by clicking "Log Current Form Output" on the devtools. It will print the JSON output of getParamsForSubmission on the console.

# Using for Item Manupilation

You can select any item currently in the postcall from the devtools to edit some properties of them, like weight & visibility. Also you can see the id's of those items in the devtools so that you can use upsertItem correctly to change the properties of the correct items. The items you select on the list gets highlighted to make it clear for the developer.

# Adding New Item

Add new item

At the end of the item list there is a section to insert new items to the postcall. You can use that tool to easily test and create new items. You can get the JSON output to use in your code when you are done with it.

# Generating the JSON Output for the Form

After you create & manupilate the form on the devtools you can generate the whole forms JSON output using the devtools, by clicking the "Copy Current Form as JSON". When you click this button your generated postcall form gets copied into your clipboard.