SebTags 1.0 Documentation: Adding Related Record

Adding Related Record

The sebGroup tag can be used to add records to a one table (typically a parent table) directly from the form of another table (typically a child table).

The following attributes must be set:

The parent cf_sebForm must also have the "sebformjs" attribute set to true.

The parent table must then have a field with a type="select" and a name matching the "fkfield" attribute of cf_sebGroup.

When all of this is set up correctly, the select box will have a "New #attributes.Label#" option added at the end. If this is selected, then the cf_sebGroup will display (which would otherwise be hidden) to allow the user to add that record directly in the form (with the fields inside the cf_sebGroup) and give the value to that field which is returned from the method of the cf_sebGroup.