function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Passing Value of html input to custom controller



    I am new with VF and apex so please help me. I am using the datepicker of jquery, so I added a html input with type text in my page like this:


<input type="Text" id="Date" name="date"/>


    I want to pass the value of this input text to a custom controller. I created in this controller a property names StartDate.





Use a property to send date value from VF page to controller :


Below is the sample code-


                                    ---------------- VF Page ---------------

                                    <input type="Text" value="{!StartDate}"/>



                                    ------------- Controller code -----------

                                    public class SaveController


                                                public Date  StartDate{ get; set; }

                                                // use StartDate value ----





    I tried it but it is not working :(.... Please help


the input text field:
<input type="text" id="from" name="from" value="{!FromDate}"/>

the properties

public Date FromDate

when I press a button on VF page, and try to access the values of the input fields, they are null.