Jainil Nagar
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] Question with multiple answers spam filter?Hello @halo-diehard
Contact form 7 provides a quiz field which you can use for this.
Please check here: Contact Form 7 Quiz
Forum: Plugins
In reply to: [Contact Form 7] How to align text to center of only 1 form out of 2Hello @rishabhtestwebsite
You can add id or class attribute to specific contact form using html_id and html_class. Then you can apply CSS using that selector id or class.
Add id or class to contact form
- This reply was modified 4 years, 12 months ago by Jainil Nagar.
Forum: Plugins
In reply to: [Contact Form 7] Нет сообщения об успешной отправке заявкиHello @y9536387,
It is already showing the message but the font color is applied to transparent so it is not visible.
Add following CSS:
.wpcf7-response-output { color: #ffffff !important; }
Forum: Plugins
In reply to: [Contact Form 7] acceptance box is not displayed correctlyHello @hanneswizany ,
It is the CSS issue. You have used
-webkit-appearance: none;
for all the input which doesn’t allow the default checkbox CSS.You should add the following CSS for the checkbox:
.wpcf7-form input[type="checkbox"] { width: 18px; height: 18px; vertical-align: middle; -webkit-appearance: checkbox; -moz-appearance: checkbox; }
- This reply was modified 5 years ago by Jainil Nagar.
Forum: Plugins
In reply to: [Contact Form 7] Where and how create an DOM event @ website?Hello @basz85
You need to add this code to your theme’s JS file.
Forum: Plugins
In reply to: [Contact Form 7] phone number allow once use onlyHello @macpheek ,
Not possible to do this with the
Contact Form CFDB7
plugin as it doesn’t store the form values in the separate columns. So if someone adds the phone number in different field it will still count as duplicate.With
Advanced Contact form 7 DB
it is possible to check the duplicates for the specific field.The code above will throw an error as it is using Advanced Contact form 7 DB database table and not able to find it.
Forum: Plugins
In reply to: [Contact Form 7] Dropdown required doesn’t workForum: Plugins
In reply to: [Contact Form 7] Show Gif Image after successful SendHello @sallyruchman
You can add your
<img>
tag inside<div class="visible-only-if-sent">
element by replacing theAfter Form Submit
.ex:
<img src="/wp-content/uploads/2020/03/test.gif">
Forum: Plugins
In reply to: [Contact Form 7] Show Gif Image after successful SendHello @sallyruchman
You can use Contact form 7’s custom DOM event
wpcf7mailsent
.Add the image to a hidden div element like below:
<div class="visible-only-if-sent" style="display:none;">After Form Submit</div>
Then use the
wpcf7mailsent
like as below:document.addEventListener( 'wpcf7mailsent', function( event ) { jQuery('.visible-only-if-sent').show(); }, false );
Forum: Plugins
In reply to: [Contact Form 7] Show Gif Image after successful SendHello @sallyruchman
You can use Contact form 7’s custom DOM event
wpcf7mailsent
.Add the image to a hidden div element like below:
<div class="visible-only-if-sent" style="display:none;">After Form Submit</div>
Then use the
wpcf7mailsent
like as below:document.addEventListener( 'wpcf7mailsent', function( event ) { jQuery('.visible-only-if-sent').show(); }, false );
Forum: Plugins
In reply to: [Contact Form 7] phone number allow once use onlyHello @macpheek
Have you install Advanced Contact form 7 DB plugin?
Also, you need to replace
Your-Form-Id
with the form Id.Forum: Plugins
In reply to: [Contact Form 7] phone number allow once use onlyHello @macpheek,
You can achieve this using the Advanced Contact form 7 DB and Contact Form 7 custom validation.
You need to add the following code to the theme’s function.php file:
function check_duplicate_phone( $formID, $fieldName, $fieldValue ) { global $wpdb; $sql = "SELECT * FROM wp_cf7_vdata_entry WHERE cf7_id=".$formID." AND name='".$fieldName."' AND value='".$fieldValue."'"; $data = $wpdb->get_results($sql); if( !empty( $data ) ) { return true; } return false; } function validate_phone_num( $result, $tag ) { $submission = WPCF7_Submission::get_instance(); $wpcf7 = WPCF7_ContactForm::get_current(); $data = $submission->get_posted_data(); $formID = $wpcf7->id(); $fieldName = $tag['name']; if( $formID == 'Your-Form-Id' ) { if ( $fieldName == 'your-phone' ) { $errorMessage = 'Phone Number has already been submitted'; if ( check_duplicate_phone( $formID, $fieldName, $data[$fieldName] ) ) { $result->invalidate( $tag, $errorMessage ); } } } } add_filter('wpcf7_validate_tel*', 'validate_phone_num', 10, 2); add_filter('wpcf7_validate_tel', 'validate_phone_num', 10, 2);
Forum: Plugins
In reply to: [Advanced Custom Fields (ACF?)] Image not showingHello @ageingdj,
Can you please share your field group screenshot here?
Forum: Plugins
In reply to: [Advanced Custom Fields (ACF?)] Image not showingHello @ageingdj,
As you mentioned your image field return type is URL then in the code you can not use
$image['url']
. Your code should be like below:$image = get_sub_field('shoot_photo'); ?> <li class="slide"> <img src="<?php echo $image; ?>"> </li>
Forum: Plugins
In reply to: [Advanced Custom Fields (ACF?)] Image not showingHello @ageingdj,
If you are using
URL
as return type then you can get image src using the$image
and no need to use$image['url']
.$image['url']
is used when return type is set to array.