Add function for the PHP plugin to validate and persist forms.