Completing an internal form on a user's behalf

When an administrator completes an XForm, the submission will be recorded against the administrator's account. However, when the internal form is being submitted on behalf of a front-end user, e.g. during a customer service telephone call, it is sometimes desirable to record the submission against the front-end user account. This has a couple of advantages:

  • The user will be able to view the submission made on their behalf when they log in to their account
  • The user's email is prefilled into the internal form's receipt email fields, to allow a receipt email to be sent to the user very easily

Using this functionality

This functionality is disabled by default, and can be enabled by checking the box labelled 'Allow submissions on behalf of a user' in XForms Pro > Settings > Compatability Settings.

NOTE Before using this functionality, Jadu strongly recommend updating the front-end scripts of your XFP install for security reasons. This can be done by contacting Jadu Support.

Once the feature is enabled, it is possible to assign an internal form to a user by adding a parameter to the end of the url when starting the form. The URL of an internal form usually looks like this:

https://www.mysite.co.uk/jadu/xforms2/xforms_internal_form.php?formID=163&userFormID=-1

To assign the form to a front-end user, add either userID or userEmail to the URL:

https://www.mysite.co.uk/jadu/xforms2/xforms_internal_form.php?formID=163&userFormID=-1&userID=1
https://www.mysite.co.uk/jadu/xforms2/xforms_internal_form.php?formID=163&userFormID=-1&userEmail=test%2Euser%40jadu%2Eco%2Euk

Note that, the userID or userEmail value must match a relevant front-end user. If passing an email address, this must be url encoded, as above. If both are passed, userID takes precedence, so userEmail is only considered if userID does not relate to a front-end user.

Once the form is submitted, the details of both the user and administrator will be visible when the corresponding Received Form is viewed.

Notes

  • Public and Private Questions

    Public questions are visible on both internal and front-end forms. When an administrator completes an internal form on a user's behalf, they will complete both public and private questions, but the user will only see the public questions when viewing the submission in their account.

  • Form Variables

    XFP provides Form - All Questions\Answers and Form - All Visible Questions\Answers as variables to use in email alerts, page instructions and complete pages. These variables list all public questions on the form, and are used instead of the alternative variables, Form - All Internal Questions\Answers and Form - All Internal Visible Questions\Answers, which also show private questions. If Form - All Internal Questions\Answers or Form - All Internal Visible Questions\Answers are used, front-end users will see questions and answers that they should not see.

    Care should also be taken not to use 'Admin - Username', 'Admin - Email' or response variables to private questions, as this may also show information to front-end users that they should not see. It is advisable to test any form where this feature will be used thoroughly before using it in production, including checking what the front-end user can see in their account.

  • Incomplete Forms

    When an internal form is started on behalf of a front-end user, it should not appear in the user's acocunt page until it is submitted by an administrator. This is to prevent to people making the same submission, and is one of the security changes required in XFP's front-end scripts.

results matching ""

    No results matching ""