This topic is: not resolved
- This topic has 1 reply, 2 voices, and was last updated 4 years, 6 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Quform PHP › Date / Time fields
I tried to follow the documentation to add date and time selectors, but it’s not correct. I take here the Date example, but it’s the same with Time.
First, in “Adding a Date form element” you can read “There is an example of the Date element HTML in the file example-all-elements.html”. But that file doesn’t exist, at least in the version I bought today in Envato. Anyway, I created this html element in my form:
<div class=”quform-spacer”>
<div class=”quform-input”>
<input id=”date” type=”date” name=”date”>
</div>
</div>
I followed the rest of the steps, and the form worked fine before. But now I get this error:
“Element ‘date[month]’ does not exist in the HTML but failed validation, you must either add the HTML for this element into the form or remove the element configuration from the process file.”
This is the code in “process.php”:
$date = new Quform_Element_Date(‘date’, ‘date’);
$date->addValidators(array(‘date’));
$form->addElement($date);
Obviously, if I remove this configuration I get the “Sent” message, but I don’t receive that data in my email.
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.