Calling custom PHP functions with OnSubmitServer

DeveloperTutorialsForms

This article relates to the <ss:forms:form> element.

OnSubmitServer Attribute

When a form is submitted, PHP callback functions can be used to process the results of the form.
This can be useful for making an API call to an external service when the form is submitted.

Add the onsubmitserver attribute to a form to call your specified function when the form is submitted:

Then declare your function in the PHP tab:

getValues()

The getValues() function returns an array of all form items, keyed by form item ids or names where specified.

getValuesForComponent()

The getValuesForComponent() function returns an array of all form items, keyed by the datacolumn attribute.

See the documentation for <ss:forms:form>