Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Customizing Field Headers

From IHRIS Wiki

Revision as of 12:12, 12 November 2013 by Sturlington (talk | contribs)
Jump to: navigation, search

Field Headers

You can customize the headers for a form field by updating the magic data associated with the headers. You can do this through the magic data browser, but the best way is to make the change in a module for your site or in your site configuration file. Headers are at the magic data location: /modules/forms/formClasses/$formClass/fields/$field/headers/$headerType

In most cases you'll use the "default" as the $headerType. If you want to have multiple headers, then change the header type and in the template that is displaying your field set the $headerType as the value for the showhead attribute. <source lang="html4strict"> </source> Replace $form, $field and $headerType with the appropriate values for your template. For example: <source lang="html4strict"> </source>

In your site or module configuration file, you can change the headers by adding the following lines: <source lang="xml"> <configuration name="custom_headers" path="/modules/forms/formClasses/$formClass/fields/$field/headers/default">


</configuration> </source> For example, to change the header of the region field in districts you can do this: <source lang="xml"> <configuration name="region_header" path="/modules/forms/formClasses/iHRIS_District/fields/region/headers/default">


</configuration> </source>