Data Manager customization: postRenderEditRecordForm
Data Manager customization: postRenderEditRecordForm
The postRenderEditRecordForm customization allows you to add rendered HTML after the rendering of the core edit record form. The HTML will live inside the html <form> tags, so that you are able to add form fields into the form.
The handler is expected to return a string that is the rendered HTML and is provided the following in the args struct:
objectName: The name of the objectrecordId: The ID of the record being editedrecord: Struct of the record being editededitRecordAction: URL for submitting the formuseVersioning: Whether or not to use versioningversion: Version number (for versioning only) of the record inargs.recorddraftsEnabled: Whether or not drafts are enabledcanSaveDraft: Whether or not the current user can save drafts (for drafts only)canPublish: Whether or not the current user can publish (for drafts only)cancelAction: URL that any rendered 'cancel' link should use
For example:
// /application/handlers/admin/datamanager/faq.cfc
component {
private string function postRenderEditRecordForm( event, rc, prc, args={} ) {
return '<p class="alert alert-warning">Before hitting submit, below - triple-chek your speling and grama!</p>';
}
}
See also: preRenderAddRecordForm