- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
A datepicker code would be very useful to embed in a contact form. This one works in Weebly - sends an email with all the fields BUT it doesn't send the date picked. Any ideas?
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker({
minDate: new Date(), // prevent selection of date older than today
autoSize: true, // automatically resize the input field
dateFormat: 'DD, d MM yy', // Date Format used
firstDay: 1 // Start with Monday
});
});
</script>
<p>Please select a Date</p>
<input id="datepicker" class="wsite-form-input wsite-input" type="text" name="datepicker" />
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Why would your even want to use the Weebly contact form? When you can use Vcita it looks better, gets peeps attention, and yes it does work and I have the heat map to prove it.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Thanks but not interested in forking over additional $$$. Trying to keep things simple by embedding a code into the contact form to make it easy for the client to choose an arrival date.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Our backend scripting probably lacks any code to handle a field added through client-side scripting like that. We have some other form options in our App Center:
https://www.weebly.com/app-center/search/contact
I'm not sure if any of those include a date picker, but they're worth checking out.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
For anyone in the future... The trick would be to add a regular drag and drop text field through the weebly interface.. then add the datepicker field as you did.
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker({
minDate: new Date(), // prevent selection of date older than today
autoSize: true, // automatically resize the input field
dateFormat: 'DD, d MM yy', // Date Format used
firstDay: 1 // Start with Monday
});
});
</script>
<p>Please select a Date</p>
<input id="datepicker" class="wsite-form-input wsite-input" type="text" name="datepicker" />
Then you would need to use jquery to copy the value of the datepicker field into the regular text field whenever someone selects a date. That will save the date into the backend. Final code block below -- be sure to swap out the id used for the id of the text field we added before adding this code block. (see comments in code)
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker({
minDate: new Date(), // prevent selection of date older than today
autoSize: true, // automatically resize the input field
dateFormat: 'DD, d MM yy', // Date Format used
firstDay: 1, // Start with Monday
onSelect: function(dateText, inst) {
var date = $(this).val();
$("#input-30571982367218956").val(date); //use the id of the text field we added through the weebly interface.
}
});
});
</script>
<p>Please select a Date</p>
<input id="datepicker" class="wsite-form-input wsite-input" type="text" name="datepicker" />
<br>
<br>
<style>
#input-305719823672189561 {
display:none !important;
}
</style>
hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Thanks for sharing, @BenSlight!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Much easier (for your paying customers) if you guys get busy with dev and give us a Date Picker in Weebly. What on earth is the matter that this hasn't been delivered? People are asking you for this for the last few years and all you do is archive it off??? Its hardly a large piece of work, and its a basic on a form these days. Using a short text field is no good as customers can bypass it by just entering a single character and we lose valuable info on a date that is required. Come on Weebly, wake up please.
Thanks !
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Totally agree, why hasn't this simple functionality been implemented yet? Essential for even a basic website builder!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
I need a date picker in the contact form !!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Thanks for your feedback, @Durga. The date picker is not an option for the Weebly contact form, but you should be able to embed a third party calendar with the Embed Code element if you like.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Apologies if I am being a klutz but I've dropped the final string into a Weebly embed code box and whilst it is now displaying a drop-down calendar on the live site, I don't have an id to update the validation?
Thanks for your help...
Damian
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
This added the date in the text field but now my contact form does not work. When I click Submit I never receive the entry. Without the code the form works fine though... Any help?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report