Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Page layout facilities > Templates > Displaying response controls side by side with question text > Custom controls
 
Custom controls
Custom controls are controls that you define and then place on the page using a sub-template. The UNICOM Intelligence Developer Documentation Library contains examples of slider and calendar custom controls that you can use as they come or customize to suit your company’s requirements.
The general procedure for writing and using a custom control is as follows.
Write the control in HTML and JavaScript, and then save it in a file in the project folder. Implement the control logic in a separate .js file.
Because survey authors are able to enter arbitrary HTML and JavaScript content, they are considered privileged users.
Create any images that are required by the template and save them in the project folder.
Create a question sub-template and add the extra tags that name the .js file and place the control on the page. For more information, see Sub-templates for custom controls.
Define the questions in the metadata section of the script and use the templates parameter to name the sub-template to be used. For more information, see Using a custom control.
See also
Sub-templates for custom controls
Using a custom control
Writing templates