Capturing URL from form submit

Kristopher Maier asked on January 12, 2017 17:38

I have a form developed with form builder that we use on multiple pages, is there a way to track the URL that the form is submitted from?

Correct Answer

Trevor Fayas answered on January 12, 2017 17:43

Yes. Put a hidden field in your form (say "PageLocation") and set a default value of the macro:

{% DocumentContext.CurrentDocument.RelativeURL @%}

That should, on submit, put the relative url from the document context as that field so you can retrieve it!

1 votesVote for this answer Unmark Correct answer

Recent Answers


Kristopher Maier answered on January 12, 2017 17:48

That worked! is there a list of these somewhere so I can see what is available?

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on January 12, 2017 18:01 (last edited on January 12, 2017 18:02)

Yes-ish. Under "System", click on "Macros" then "Console" and this allows you to test macros. however it can be difficult to see page-specific macros as the context is lost.

To see page-specific macros, you can just put a rich text or static text or anything and then insert a macro, the macro insert will allow you to look at your macros and often you can hover over to see their value if available.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.