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.
Related
I use the Contact Form 7 plugin for contact forms on our site. I am using this on a WP installation with multiple sites. We have employment application forms on each site, and to identify the site when we do a REST call to our webapp, I would like to include the site_id (or blog_id, I'm unclear on which is the right name) so it can be used to reference the WP site in the other app. I installed the Dynamic Text Extension for this particular task, and this is my first attempt, based on the help docs, to add a hidden field with the blog_id:
[dynamichidden blog_id id:blog_id "CF7_bloginfo value='blog_id'"]
and end up with this:
<input name="dynamichidden-927" value="Elite Trade Painting Calgary" size="40" class="wpcf7-form-control wpcf7dtx-dynamictext wpcf7-dynamichidden" id="blog_id" aria-invalid="false" data-hasqtip="true" type="hidden">
I should note that no matter what I put in the tag, the same value comes up. I know I am editing the right form because if I delete the tag, it disappears completely – but no matter what I change, it always has the wrong value.
https://elitetradepainting.com/calgary/employment-opportunities/
My mistake was looking at the wrong page and thinking that bloginfo() returns the blog id - it doesn't. The DTX developer answered my question in WP forums and advised me to use a shortcode, so I wrote a callback that uses get_current_blog_id:
in functions.php:
function get_blog_id_callback() {
return get_current_blog_id();
}
add_shortcode('get_blog_id', 'get_blog_id_callback');
Then the snippet for the control in the Edit Contact Form page is as simple as:
[dynamichidden blog_id "get_blog_id"]
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.
I'm using WordPress 4.2.2 and Contact Form 7 version 4.2.1. But when my contact form shortcode outputs the html code the name="" attribute is blank and W3C html validator is giving me errors because of this. How can I fix this.
It's called "Contact form 7", but I guess that is beside the point.
You can set the form name attribute using the html_name attribute of the shorttag like this:
[contact-form-7 id="7" title="My awesome contact form" html_name="my_awesome_contact_form"]
It actually seems a bit strange that this is empty by default since that is considered invalid markup - so you may want to contact the developer(s) and let him / them know, so it can be fixed - I can't even find any documentation referencing the html_name attribute - I only found it by looking directly in the source...
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 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' );