Managing PHP Templates - The Basics

Created by Jake Baker, Modified on Mon, 12 Feb 2024 at 12:36 PM by Ashleigh Whitworth

This article will walk you through the creation and editing of PHP templates, a feature available to system admins on HPA2.


Note: Whilst a basic PHP template can be created with very limited technical knowledge, utilising more advanced features of PHPs will require some degree of technical expertise or the willingness to learn some of the basics of HTML, CSS and the in-built features of HPA2.

Locata cannot offer training on HTML or CSS, but we are happy to point you towards some other resources. We can also configure the template you desire on a consultancy basis. For more information, or to see examples, please email enquiries@locata.org.uk



TABLE OF CONTENTS


Permissions and Access

In order to edit PHP templates, you'll need the relevant permissions. A user with the appropriate permissions can grant you these following the below steps:

  1. Click Settings
  2. Click Users
  3. Edit the user requiring the permission
  4. Grant the "Manage PHP" permission
  5. Save changes

 

With the above steps completed, that user will now be able to create and edit PHP templates.


Creating a new PHP Template

Once you have the correct permissions, you will be able to edit and create new PHP templates. 


Follow the below steps to create your new PHP template:

  1. Click Settings
  2. Click PHP
  3. Click "New Template"
  4. Name your new template and click "Save"



Did you know: If you are sharing your system with other local authority partners, you can opt to share PHP templates with the other partners so they can also utilise it. Be aware that they will also be able to edit your template!

As an alternative, you can clone your template - and then share only the clone with your partners, keeping the master for your own local authority to have control of.


Adding Sections to PHPs

Once you've created the template, it's time to configure some initial sections that we can add content to. Sections are a great way to bring structure to your PHP template. Follow the steps below to add sections.

  1. Click "New Section"
  2. Fill in the details of your new Section, explanations for each field are below
  3. Click Save


Section: The name of your Section - something that makes it clear what the section contains.
Sequence: Where this section appears in relation to other sections. Lower numbers appear first.
HTML: This is the content of the section header. HTML/CSS can be used here, to affect how the template looks.
Needs Agreement: Check the tickbox to add an option for customers to mark whether the information included within a section is agreed by the customer to be correct.

 
You've added a section to your template, well done! The next step would be to add items to your section, to add content to your PHP.


Client Agreement for Sections

You can configure your plan template to require (or not require) client agreement for the sections you setup. This appears as a confirmation with the words "I agree that this information is accurate", as per the below image.




To add the agreement confirmation buttons to a section, follow the below steps:

  1. Navigate to the relevant PHP template
  2. Click "Edit" against the relevant section you require the client to agree to
  3. Click the "Needs Agreement" checkbox for that section
  4. Save the section



Adding Items to PHPs

Once you've created the relevant section, it's time to add items to the section. Items are the content of your PHP. 


Note: Items are described as the "Content" of a PHP. They also belong to specific sections. For example, in the "Your Tasks" section, the items represent individual tasks which make up the overall list of tasks. 


Follow the steps below to add items.

  1. Under the section for which you'd like to edit the items, click "View Items"
  2. Click "New Item"
  3. Fill in the details of your item
  4. Click Save


Item: The name of your item - something that makes it clear what the item contains.
Sequence: Where this item appears in relation to other items. Lower numbers appear first.
Type: The type of item - explained in the next Note.
HTML: This is the content of the item. HTML/CSS can be used here, to affect how the template looks.
Add by Default: Check the tickbox to have this item always appear on the PHP.
SQL: Advanced configuration requiring some knowledge of SQL code.
Days to Complete: If your item is a task, this is how long until it must be completed.


Note: The types of item are explained further here:

Client Task: When these are added to the plan, they show as completeable by the client.
Client Upload: These tasks allow the client to upload specified documents via the client portal. Uploads will be added directly to the journal.
Message: Send a special message to the client. This adds the message to their plan.
Question Checkbox List: These are questions where multiple options can be selected.
Question free-form: A Free-text field for you to answer a question in. The question name is then the Question itself.
Question free-form large: As above, but the space available to answer the question is larger.
Question Multiple choice: A question with a dropdown list where a single answer can be selected.
Question Yes/No: A question where the answer can only be either Yes or No.
Staff Guidance: Information which displays only to the officer viewing from the back office.
Statement: This item type doesn't have any additional features nor is it a question - so simply adds content to the page, such as guidance for the client on the process.
User Task: When these are addes to the plan, they show as completeable by the client.

 


Don't forget: PHP template editing benefits from technical expertise, particularly around HTML and CSS. If you'd like us to help in creating the PHP of your templates, or just to see some of examples of what we've done for other Local Authorities, please reach out to us.


You've added an item to your template, well done! 


You might be interested in some more advanced features of editing PHPs, available in the below linked article:


Managing PHPs - Advanced


Copying / Cloning Templates

It's sometimes easier to utilise the structure and content of existing PHP templates to create new ones - saving you some time in the process. You can easily clone existing templates by following the below steps:

  1. Click Settings
  2. Click PHP
  3. Find the template you'd like to clone
  4. Click Copy (This will create a duplicate template in the same folder)
  5. Enter the duplicate template and amend as appropriate






Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article