am using wordpress 4.5.9, contactform7 4.4.2 and contactform7 datepicker 2.6.0.
after updating contactform 7 and contactform7 datepicker, date field shows
[date* date-741 date-format:mm/dd/yy min-date:0 max-date:1 buttons placeholder "date"]
Please find the below link
Date picker error Image
You need to pass min and max date param like the following ,
[date* your-date min:today+0days max:today+10days step:1 class:required "Date"]
Also you need to use datepicker extended plugin if above one not work.
Related
I am a plugin called contact form 7 for contact us page. I have date picker in it. It is not working in firefox but working in chrome. How can I fix this error ? Can anyone the solution for this problm ?
The answer from #Christophvh was right but incomplete. The datepicker calendar is here but not visible. There seams to be a bug in the jquery datepicker that sets an incorrect z-index value thus making the calendar hidden behind the form.
Here is how I made it work :
1) Enable WCF7 fallback but putting this code snippet in your theme functions.php file
add_filter( 'wpcf7_support_html5_fallback', '__return_true' );
2) Fix the bug by putting this code snippet in your theme functions.php file, or by editing you theme CSS if you know how to :
add_action('wp_head', 'replacethiswithyourthemename_wcf7_datepickerfix');
function replacethiswithyourthemename_wcf7_datepickerfix(){
?><style>#ui-datepicker-div {z-index:99!important;}</style><?php
}
Contact form 7 uses HTML5 for this, functions like Datepicker are not supported by some browsers. The following answer is from the FAQ page http://contactform7.com/faq/
Does Contact Form 7 support HTML5 input types?
Yes. Contact Form 7 3.4 and higher support form-tags corresponding to
these HTML5 input types: email, tel, url, number, range and date.
If you don’t wish to use HTML5 input types, you can disable this by
adding the following code into your theme’s functions.php file: 1
add_filter( 'wpcf7_support_html5', '__return_false' );
Note that even the most current browsers partially support HTML5. For
example, the latest Firefox doesn’t support the date input type (that
allows you to choose a date from a calendar user interface) and the
number input type (that allows you to input a number value from a
spinbox UI) yet — so Firefox provides a general text input field as a
fallback instead of a calendar and spinbox UI. This may confuse users
because they can’t detect what type of input value this field expects.
So, you may feel that it is better to wait for all browsers to support
all HTML5 features completely.
But you don’t need to wait! Contact Form 7 offers a better solution.
Contact Form 7 is able to provide jQuery UI-based fallback for the
date and number input fields. By using this solution, you can provide
calendar UI for the date field and spinbox UI for the number field,
respectively, even with Firefox or Internet Explorer.
By default, this fallback feature is disabled because it loads extra
JavaScript and CSS (makes for poor performance) and it is only
necessary for websites that use the date or the number input fields.
If you use the date or number input fields and wish to use this jQuery
UI-based fallback feature, add the following code into your theme’s
functions.php file and activate the feature: 1
add_filter( 'wpcf7_support_html5_fallback', '__return_true' );
So in your case adding
add_filter( 'wpcf7_support_html5_fallback', '__return_true' );
will work if you install jquery UI, which you can find here: https://jqueryui.com/
I am using the Avada theme on my WordPress which makes use of Countdown Boxes, constructing pages using the provided Fusion Page Builder. The countdown box will show the number of days to a certain date which is output through a plugin called Days-Until. Syntax for implementing this: [days_until date="15 April 2015"].
I am trying to use this Days-until shortcode and pass the value to the countdown box shortcode using the Fusion (WYSIWYG Editor):
[counters_box columns="4" color="" title_size="" icon_size="" body_color=""
body_size="" border_color="" class="" id=""][counter_box value="[days_until
date="4 April 2015"]" unit="" unit_pos="suffix" icon="" direction="up"]"
unit="" unit_pos="suffix" icon="" direction="up"]Text[/counter_box]
Unfortunately the code doesn't work, and the following is displayed.
0 (in the counter box)
unit=”” unit_pos=”suffix” icon=”” direction=”up”]” unit=”” unit_pos=”suffix” icon=”” direction=”up”]Text
Is it even possible to do what I'm trying to do?
Thanks
It's not possible to nest one shortcode inside another (i.e. your days_until shortcode inside the counter_box) without some programming.
It's a commercial theme so we're unable to see the original PHP code.
What'd you need to do is edit the code for counter_box so it calls do_shortcode on the value parameter.
do_shortcode is a function that expands any shortcodes in the supplied text (in the same way they are if they've been pasted into the content field of a Page or Post), so the days_until code will be converted to a number that the counter can use.
I would suggest getting in touch with the theme developer.
Further reading: WordPress Shortcode API
I'm using Contact Form 7 plugin in Wordpress, I would like some help in my datepicker on how to change the display date format in the front end in my form.
The default displays mm/dd/yy and I want to change it to dd/mm/yy but unfortunately I could not used this code:
dateFormat:dd/mm/yy
it seems it was not working.
I also tried to change the code in the plugin editor of datepicker but it did not work also.
Do you have any idea? an you help me how to change the date format without installing contact form 7 datepicker because I would like to use the default datepicker that include in the contact form 7.
I changed the display date format to dd/mm/yy in the front end (also in the generated email) of my form by using plugin Custom Datepicker NMR for Contact Form 7.
This allows you to use a new input field in your contact form called [datepicker ]
Install/activate the plugin and specify format date to show in the web browser like this:
[datepicker myFirstDatepicker id:myFirstDatepicker format:dd/mm/yy]
This plugin uses jquery-ui datepicker.
You do the configuration in the shortcode.
[date date-test date-format:dd/mm/yy]
Worked perfectly for me. Try with no spaces: date-format:dd/mm/yy
So code for me in full for the line looked like this:
<p>
Work Start Date (<span class="required">*</span>)<br />
[date* start-date date-format:dd/mm/yy]
</p>
All you have to do is put:
[date your-date-from min:2017-01-01 max:2025-12-31 step:7 class:required "2017-01-01"]
Obviously put the dates you wish to use.
I have installed a "Contact Form 7" plugin on following WP blog https://vsupholstery.com/ and I have added date field inside that form (form is located below slider). The problem was that the date field was not functional inside Firefox, IE and Safari, so I installed the additional plugin from this page http://wordpress.org/plugins/contact-form-7-datepicker/ . Now the date field is working OK and it shows the calendar when you click inside date field, but the calendar style does not work.
Any idea how to fix this problem since I tried many things and nothing works.
Thanks.
Please add below code in your theme's functions.php
add_filter( 'wpcf7_support_html5_fallback', '__return_true' );
Currently I am using this php code to display Text for a custom field with taxonomy 'years' in a theme in wordpress, that works well
php echo get_post_meta($post->ID, 'years', true); (Including the php opening and closing tags)
But the problem I have is that if I want to change this Text, to a Drop Down Box (a select2 type), to let choose different options to the users, I cannot find how to display the values correctly.
Any body has any idea of how to display correctly the value of a custom field froma Drop Down selec2 type ?
Thanks for any help on this
Here's how I would accomplish this.
On your post or page, add the custom field. So if you have a custom field of 'years' we'll add 2013 and 2014 and 2015 as 3 entries. Save your post/page.
This creates an array for this custom field that you can iterate through. see here for code. http://pastebin.com/Ungm3WZW
FYI - I referenced the codex for http://codex.wordpress.org/Function_Reference/get_post_custom_values