Sometimes you may need a form to submit to more than one location, for example where you need to process the same submission in different ways or on different platforms. Formulayt allows you to send any form submission to a secondary location, alongside the primary route defined for that form type.
This is achieved using a hidden field. To enable this feature, follow these steps:
- In your Formulayt account, create a new hidden field called 'secondarysubmissionurl'.
- If you want gate editors to be able to directly define secondary submission URLs on their gates, you can set this field to Pre-populate from the Gate editor. Otherwise, you can use rules to define if and when the field will contain a URL.
- Publish your change.
- That's it! Now, any time that a Formulayt form is submitted, this field will be automatically checked. If it contains a valid URL (starting with https://), a secondary submission will be sent to that location. Note that:
- The secondary submission will always be sent as a basic Fetch request.
- We won't monitor to see if the submission is successful or alert the user if it fails, so it's important that you test that your submission location works as expected and doesn't use any validation rules or other logic that could cause submissions to fail.
- If the field is blank or its value doesn't look like a URL, no secondary submission will be sent.