|
||||||||||||||||
|
|
Section 6. Manage fields Overview You can customize a set of fields using the Create new property form. This section discusses various actions you can perform in the context of field management . It contains the following topics :
Accessing the field management tasks Managing a set of fields for a property is one of the main tasks in phpRealestate. It allows you to manage information displayed about a property, and make the property add form easy to work with. You can also control the appearance of property's details in the front-end interface, because some fields have their own templates. You can also create a variety of different field sets for every language. This section discusses how to use various HTML input controls to create a set of fields for a property, as well as peculiarities of their appearance in the front-end interface. Use the Fields and Check groups’ menus to manage a set of fields for a property (see picture 12).
Add a new field to the current language Choose Fields > Add to see the Add new field form (see picture 13).
This form has the following fields:
If all of the values are set correctly, then after clicking the Add new button a message is displayed notifying that new field has been added. Let's look at the types of HTML input control in more detail. The Type drop-down menu contains the following options:
This type is used to control the input of one-line text. This is probably the most commonly used input control type, it can be used for the Address or ZIP code fields. Data format is not checked.
This type allows you to input multi-line text. It is ideally suited for such fields, as Description, if the length of the input text is quite large and it's not convenient to enter it as a single-line text. Data format is not checked.
This is a drop-down list of pre-defined options. It is ideally suited for such fields, as Country or State, when it is much easier to form a list of fixed options than to manually fill in this field every time. Data form is not checked.
This is also a drop-down list of pre-defined options, but unlike the Select type it allows you to select several elements at once. This field can be used to enumerate details that are present (or not present) in a particular property. Data format is not checked . Special templates are required to display this field type in the front-end interface. Details for this field type are displayed in a column (discussed in Section 12 - Templates and internal tags ).
This field type is used to control the input of single-line text containing integer numbers. It allows you to avoid accidental mistakes during data input. It can be used for such fields, as the number of rooms, floors etc.
This field type is used to control the input of single-line text containing float numbers. It allows you to avoid accidental mistakes during data input. It can be used for such fields, as floor space etc. View the list of existing fields for the current language Choose Fields > View / Modify to see the list of existing fields for the current language. Fields are displayed in a table (see picture 14).
The first column of the table contains the name of the field. The second column contains the type of HTML control set for this field. The third column displays the code of the field which is used for the front-end template. The last column of the table lists the action buttons used to edit and delete any field in the list. Edit the existing field for the current language After clicking the Edit action button next to any field in the list, the field edit form is displayed. It contains the same fields as the field add form, except for the HTML control type. If all of the values are set correctly, then after you click the Save button you will receive a message notifying that changes have been saved. Manage elements in the Select and Multiple type fields To manage elements in the Select and Multiple type fields, click the Edit action button next to the appropriate field in the list of existing fields. Under the field edit form you will see a form to add new elements, as well as the list of existing elements (see picture 15).
The Add new element form only contains the Item name field. This field is mandatory. If this field is filled in correctly, then after you click the Add new button you will see a message notifying that new element has been added. The name of this element will then appear in the appropriate control field in the property add and edit forms, and possibly on the property details page in the front-end interface (if you select this element in the form). Existing elements are displayed in a table. The first column of the table contains the name of the element. The second column lists the action buttons used to edit and delete elements in the list. After clicking the Edit action button next to any element in the list a new window is displayed, where you can enter a new name of the element. Click OK to change the name, or Cancel to discard the changes. After clicking the Delete action button next to any element in the list, a delete confirmation window is opened (see picture 16).
Picture 16 If you click OK, you will see a message notifying that the selected element has been deleted. You cannot delete an element, if it is selected in the property detailed information. Click Cancel to cancel this operation. Delete the existing field for the current language After clicking the Delete action button next to any field in the list, a delete confirmation window is displayed (see picture 17).
Picture 17 Click OK to delete the selected field, or Cancel to keep the field. Be careful while deleting fields, because this operation also deletes field data from all the properties for the current language. Checkbox groups Using the checkbox groups is another way to add information about a property. Checkbox groups are very similar to the Multiple type fields discussed above, but they differ in their representation of the property add and edit forms, as well as their appearance in the front-end interface. Checkbox groups are also language - dependent . Checkbox groups can be used to enumerate details, when it is necessary to specify which of them are present in a particular property, and which are not. A checkbox group can be thought of as a set of toggles of Yes/No type (see picture 18).
The front-end interface displays only those toggle titles which are set to Yes. Special templates are required to display the fields of this type in the front-end interface (see Section 12 - Templates and internal tags ). Details for this field type are displayed in several columns, the number of columns is set when you create a group and can be changed in the edit mode. Add a new checkbox group to the current language Choose Check Groups > Add to add a checkbox group (see picture 19).
This form contains the following fields:
This name is used as a title of the group in the property details create and edit forms. Besides, this name is displayed as a title of the group in the front-end interface. This field is mandatory.
The number of columns to display group elements in the front-end interface. This field is mandatory . The value of this field must be an integer number.
Short name of the group (a code ). This code is then used in the front-end templates to display this group. A code name must be unique for a language. This field is mandatory. If all of the values are set correctly, then after you click the Add new button you will see a message notifying that new group has been added. View the list of existing checkbox groups for the current language Choose Check groups > View / Modify to see the list of existing checkbox groups for the current language. Checkbox groups are displayed in a table (see picture 20).
The first column of the table contains the name of the group. The second column displays the code of the group, which is used in the front-end template. The third column lists the action buttons used to edit or delete groups in the list. Edit the existing checkbox group for the current language After clicking the Edit action button next to any group in the list, the Edit group form is displayed. This form contains the same fields, as the Add new group form. If all of the values are set correctly, then after you click the Save button you will see a message notifying that the changes have been saved. Manage checkboxes within a group Click on the Edit action button next to any group in the list to manage its checkboxes. Under the edit form you will see a form to add new checkboxes, as well as the list of existing checkboxes (see picture 21).
The Add new checkbox form only contains the Checkbox name field. This field is mandatory. If this field is filled in correctly, then after you click the Add new button you will see a message notifying that new checkbox has been added. Its name will then appear in the property add and edit forms, as well as in the property details page in the front-end interface (if its toggle is set to Yes ). Checkboxes are displayed in a table. The first column of the table contains the name of the checkbox, the second column lists the action buttons, which are used to edit or delete checkboxes in the list. After clicking the Edit action button next to any checkbox in the list a new window is displayed, where you can enter a new name of this checkbox. Click OK to change the name, or Cancel to discard the changes. By clicking the Delete action button next to a checkbox in the list you open a delete confirmation window (see picture 22)
Picture 22 Click OK to permanently delete the selected checkbox, or Cancel to keep it. Delete the existing group for the current language A click on the Delete action button next to any group in the list opens a delete confirmation window (see picture 23).
Picture 23 Click OK to permanently delete the selected group, or Cancel to keep it. Be careful deleting groups, because this operation also deletes data of this group from all the properties for the current language. |
![]() |