Ask Search:
thylak softthylak soft 

what is the difference between input field and input text

what is the difference between input field and input text
Matt BrownMatt Brown
If you are referring to the Visualforce Apex tags please consult the Visualforce Developer Guide. http://wiki.developerforce.com/index.php/Documentation#Apex_and_Visualforce
Rajith MedaganiRajith Medagani

Input field by definition:
An HTML input element for a value that corresponds to a field on a Salesforce object. The
< apex:inputField > component respects the attributes of the associated field, including whether the field is required or unique, and the user interface widget to display to get input from the user. For example, if the specified < apex:inputField > component is a date field, a calendar input widget is displayed. When used in an < apex:pageBlockSection >, < apex:inputField > tags always display with their corresponding output label. - from component reference

In simple language - It's the field on the object and you can have any data type, which users can input . Example Picklist, look up, check box and / or multi select picklist etc......

Where as Input text by definition -


An HTML input element of type text. Use this component to get user input for a controller method that does not correspond to a field on a Salesforce object.

This component does not use Salesforce styling. Also, since it does not correspond to a field, or any other data on an object, custom code is required to use the value the user inputs. - from component reference.

This is a field on the object which is of data type Text . Users can use to input only text using this field.

You cannot use this for picklists , check boxes or any other data type.

Please let me know if this helped in understanding the difference. If not you can go through the Component reference which will give you in detail explanation along with the usage.

your org/apexpages/apexcomponents.apexp

or even  VF developer guide as Mattybme1 suggested.

Matt BrownMatt Brown
Rajith Medagani great explanation! We are trying to direct all technical related questions to the Developer Discussion Boards and Developer Force in general as the Answers forum is not the most appropriate place. :)
Rajith MedaganiRajith Medagani
sure....