Search:     Advanced search

liberty of shameless customization of Web Forms and fields

Article ID: 108
Last updated: 19 May, 2012
Revision: 11
Print
Email to friend
Views: 0

All forms are editable through INI files. By default, You will find en_US.xxxxx.ini (xxxxx representing correspondent module name) file located at application/modules/$ModuleName/forms/source/en_US.xxxxxxForm.ini  ($ModuleName represents your presently working module e.g hotel , property, vacationrentals etc).   Each paragraph is responsible for building a single field and it’s attributes. You can edit, remove or comment out a paragraph to wipe off a field. Form’s source INI file is self explanatory and requires some kind of knowledge in web form management. We would strongly recommend you to comment out (NOT to delete) line, just by adding  ; (colon) sign as prefix to each line, so that you can still survive by removing ; (colon) sign for any un-authorized changes.  Both delete and comment out results same output but comment out is preferred because you will still have a chance to come back and survive in cause of any wrong doing.

Managing Forms through INI files:

We assumed, you have already learned and created a dynamic web form using our Application. Now we will explain how you to join an existing web form(s) to a listing.   Please Click Here  to know how to create a new custom web form or see Video Tutorials here. 

 Now, we will show, how can we edit, delete and play with web forms and form’s fields through predefined ini files. All forms are editable through .ini files. You will find en_US.xxxxx.ini (xxxxx representing correspondent module name) file located at application/modules/$YourModuleName/forms/source/en_US.xxxxxxForm.ini ($YourModuleName is your presently working module e.g hotel , property, vacationrentals etc).  Each paragraph is responsible for building a single field.  

Few Locations of Form’s Source:

Property :  The forms setting are located application/modules/Property/forms/source/en_US.ProductForm.ini .

Hotel :   The forms setting are located application/modules/Hotels/forms/source/en_US.ProductForm.ini

Vacation Rentals: The forms setting are located application/modules/Vacationrentals/forms/source/en_US.VacationrentalsForm.ini

Tours Mgmt :  The forms setting are located application/modules/Tours/forms/source/en_US.ProductForm.ini

Autos Mgmt :  The forms setting are located application/modules/Autos/source/en_US.ProductForm.ini.

Membership Form :  The forms setting are located application/modules/Members/source/en_US.ProductForm.ini .

And so on………

By default, You will find en_US.xxxxx.ini (xxxxx representing correspondent module name) file located at application/modules/$ModuleName/forms/source/en_US.xxxxxxForm.ini  ($ModuleName represents your presently working module e.g hotel , property, vacationrentals etc).

Here we choose customizing the forms of property modules just as example. This tutorial is applicable to any modules you want because the process is generic to all modules. 
 
Open the .ini file using your preferred html editor and follow the below images. Each paragraph is responsible for building a single field and it set required attributes. The en_US.xxxxxxForm.ini file is self explanatory and requires some kind of knowledge in web form management.
 
 

 Samples managing forms through .ini file

 

How Forms are rendering to Frontend

 

Now, we know how to manage web forms and it’s fields. Let us know show you, how the changes reflects to frontend (public viewable) interface. Here is a short explanation illustrating how program parse form’s ini files:

property.elements.property_name.type = "text"

Splitting above command as :

property =  Modules name
elements = elements / field of a form
property_name = field name 
type =  attributes of a field / element  

= "text" is a Changeable Value 

  See the following images for better illustration

 

 Samples managing forms through .ini file

 

How Forms are rendering to Backend

Let us know show you, how the changes reflects to back-end(Admin or after login) interface. You can manage form more efficiently through add.phtml or edit.phtml block file to manage forms. A Block is basically a data resource for Views. It uses the sites Models, grabs the data, makes any necessary adjustments, and then makes that data available to a View. For instance, when you override / create a Block that calls a product collection, that product collection is pulling some products’ data from a Model. The Block is where you create such a product collection and implement the product collection’s methods, such as adding filters or ordering the products in a certain way. That product collection is then made available to your View so you can display the products on a page.

Here is where the backend form blocks are located to play with.

  Managing Admin Add / Edit Blocks

 

 

Now, we know how to manage web forms and it’s fields. Let us know show you, how the changes reflects to backend (admin view) interface. Here are few images illustrating how program parse form’s ini files:

 

 

  Managing Admin Add / Edit Blocks

 

 How to Remove / Delete new field(s):

We would not recommend deleting field(s) or tabs (containing list of fields) because improper deletion this may crash your search and program if any of key fields is missed. This will be one of HIGH RISK changes which is strongly discouraged. If you still want to remove field(s), please apply EXTREME cautions before deleting because every fields are pointed to RDBMS fields storing it’s value to the database, furthermore fields maintains many relational links with external files followed by it’s referential instance.


By default the fields are mostly divided into two parts. There are:

01)  Core / Key fields
02)  Descriptive / informative fields

Core / Key Fields :

Most of the cases the key Fields are mandatory with few exceptions and used as search parameter. These key fields maintain many relational links with external files followed by it’s referential instance and values MUST be set in database. For example price, room number, properly owner / agent, size , availability calendar etc and you will understand its importance just using common sense. Most of these fields are used for searching / filtering at frontend, therefore system cannot afford removing key fields. If you delete / remove any key field, it may end up resulting destruction and system may crush down.


Descriptive / informative fields :

These fields carry less impotence in comparison with key fields. For example address, features, brochure, maps, policies etc, where these fields are never used in search parameter. The values of these fields are option and database allows you to go with empty value. You can remove these fields with extreme caution.

Removing Field(s) :

All forms are editable through .ini files. You will find en_US.xxxxx.ini (xxxxx representing correspondent module name) file located at application/modules/$YourModuleName/forms/source/en_US.xxxxxxForm.ini ($YourModuleName is your presently working module e.g hotel , property, vacationrentals etc). Each paragraph is responsible for building a single field. You can remove or comment out a paragraph to wipe off a field. en_US.xxxxxxForm.ini file is self explanatory and requires some kind of knowledge in web form management. We would strongly recommend you to comment out (NOT to delete) line, just by adding ; (colon) sign as prefix to each line, so that you can still survive by removing ; (colon) sign for any un-authorized changes. Both delete and comment out results same output but comment out is preferred because you will still have a chance to come back and survive in cause of any wrong doing.


See the image shown below 

  Managing Admin Add / Edit Blocks

This article was:  
Also listed in
folder Modules Wise Documentation -> Manage Articles / Content (CMS)
folder Templates Customization
folder Developer Documentation
folder Modules Wise Documentation -> Custom Web Forms

Prev   Next
How to change default Country and Currency ?     Sales & PreSales FAQ