alterPost

alterPost(args)

args is a dictionary with the following keys:

  • data - The form state / user data.
  • url - The URL to which the data will be posted.
  • form_id - The public ID of the form.
  • form_definition - The form definition.

This callback is called before POSTing data. It is used to alter the data that will be POSTed.

Note that only fields which already exist on the form may be modified during alterPost. It is not possible to add new fields to the form submission in this callback.