How to use XPATH to pass parameters


You can create Formotus form links that pass parameters by using the XPATH of fields you want to populate.  For example, you can select a form link that will open your form in Formotus Now or Formotus Pro, and have fields automatically populate with data.  

Creating the link for Formotus Now vs Formotus Pro is slightly different.  If you plan to use Formotus Pro, please read the last note at the end of this article. 


First, create a Formotus Now link for the form of your choice.  To do this, advance to the Links tab in the Formotus portal, select your form, and the COPY LINK button.  You will add to this link, so paste it somewhere you can edit text, for example, Microsoft Word.  

The link will look something like this:

Next, you need the XPATH for the fields you want to populate.  In your creator form, select the control of your choice; I will be using a textbox.  Next, select Fields in the right panel, and View XPath.

COPY XPATH, and paste it on the end of your Formotus Now link separated by '&'.  Adding the '&' is an important step, see the example in red below.  Without this, the link will not open correctly.

The link will now look like this:

Now you can specify what field data you want within the control.  For my example, I want my textbox to read 'test' when my form is opened.  I simply need to add '=test' after my Xpath at the end of my link and I'm done.

The final link will be the following:

Now, when I select the link, Formotus Now will be prompted, and my form will be opened with 'test' within the textbox.

NOTE: If you plan to use your link in Formotus Pro, there is one more change you need to do in the link. Find 'Now' in the link and replace it with 'Pro'.  See the example in red below:



Have more questions? Submit a request


Please sign in to leave a comment.