
-
AuthorPosts
-
August 23, 2025 at 8:46 pm #1488454
Hello ,
I am very happy with the concact form layout on Windows – Desktop – Mobile and tablet.
But I have noticed that on my iphone the date field doesn’t have the same layout as Enfold.How can I change this?
Thanks for any tips.
August 26, 2025 at 6:27 am #1488525Hey Chris,
Thank you for the inquiry.
What happens when you add this css code?
#top .avia_ajax_form .text_input, #top .avia_ajax_form .select, #top .avia_ajax_form .text_area { -webkit-appearance: none; }
Please make sure to toggle or temporarily disable the Enfold > Performance > File Compression settings, then purge the cache to make sure that the changes take effect.
Best regards,
IsmaelAugust 26, 2025 at 7:12 pm #1488549When I use the code the field is smaller. Not quit visible.
August 26, 2025 at 7:13 pm #1488550When I use the code the field is smaller. Not quit visible.
Is it the .wpcf7 input[type=date].-
This reply was modified 2 weeks, 1 day ago by
Chris mssn.
August 27, 2025 at 7:45 am #1488587Hi,
Thank you for the update.
Please try to update the modification with the following css:
#top .avia_ajax_form .text_input, #top .avia_ajax_form .select, #top .avia_ajax_form .text_area, .wpcf7 input[type=date] { -webkit-appearance: none; width: 100%; margin-bottom: 0; display: inline; min-width: 50px; padding: 13px; border-radius: 2px; border: solid 1px #e1e1e1; background: none; }
Let us know the result.
Best regards,
IsmaelAugust 27, 2025 at 8:51 pm #1488629Thanks for your response Ismael,
It shows me the same field as in the picture I’ve sent before.
When I remove “-webkit-appearance:none” it shows me an empty field without a calender pictrogram and a date format.I have used the following code in my field
<p class=”first_form form_element form_element_half”
>Wanneer*<br/>[date* date-9 class:text_input]
</p>
So my field looks perfect on a pc and on Android.
Could it be that IOS blocks the datepicker settings?August 28, 2025 at 8:39 am #1488647Hi,
Could it be that IOS blocks the datepicker settings?
Yes, based on other threads, iOS enforces its own style and behavior for input fields with the type date or date picker. We recommend reaching out to the plugin developers for additional assistance with this issue.
You can try this script to convert the date input field to a normal text field, but we can’t guarantee it will resolve the issue.
function ava_custom_script() { ?> <script> // convert input date to text document.addEventListener('DOMContentLoaded', function() { document.querySelectorAll('input[type="date"]').forEach(function(input) { input.setAttribute('type', 'text'); input.setAttribute('readonly', 'readonly'); }); }); </script> <?php } add_action('wp_footer', 'ava_custom_script', 9999);
Best regards,
IsmaelAugust 28, 2025 at 7:21 pm #1488679Well, it doesn’t work for the site. I am going to give it up for now.
But thanks anyway for your response.
Kind regards,
ChrisAugust 28, 2025 at 8:02 pm #1488685Ismael, I had a chat with Chatgpt and we came up with this code.
// Voegt een custom calender icoon aan een data veld function ava_custom_calendar_icon_script() { ?> <style> .custom-date-wrapper { position: relative; display: inline-block; width: 100%; } .custom-date-wrapper input[type="date"] { width: 100%; padding-right: 40px; /* ruimte voor het icoon */ position: relative; z-index: 2; background-color: #fff; } .custom-date-wrapper::after { content: "📅"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 20px; color: #888; z-index: 3; } </style> <script> function addCalendarIconToDateInputs(context = document) { context.querySelectorAll('input[type="date"]:not(.calendar-styled)').forEach(function (input) { if (input.closest('.custom-date-wrapper')) return; var wrapper = document.createElement('span'); wrapper.className = 'custom-date-wrapper'; input.classList.add('calendar-styled'); input.parentNode.insertBefore(wrapper, input); wrapper.appendChild(input); }); } document.addEventListener('DOMContentLoaded', function () { addCalendarIconToDateInputs(); // Contact Form 7 AJAX support document.addEventListener('wpcf7invalid', function (event) { addCalendarIconToDateInputs(event.target); }); document.addEventListener('wpcf7submit', function (event) { addCalendarIconToDateInputs(event.target); }); // Extra: hoogte instellen voor mobile if (window.matchMedia("(max-width: 768px)").matches) { document.querySelectorAll('input[type="date"]').forEach(function(input) { input.style.height = '40px'; input.style.lineHeight = '40px'; // mooi gecentreerd }); } }); </script> <?php } add_action('wp_footer', 'ava_custom_calendar_icon_script', 9999);
For now the height is the same as my other fields, and I have a calendar icon on my iphone.
The width of the field doens’t seem adapable.-
This reply was modified 1 week, 6 days ago by
Chris mssn.
August 29, 2025 at 6:58 am #1488702Hi,
Thank you for the update.
Is the calendar or date picker still functional with your modification? Try to adjust the width of the input field in this block:
document.querySelectorAll('input[type="date"]').forEach(function(input) { input.style.height = '40px'; input.style.lineHeight = '40px'; // mooi gecentreerd input.style.width = '100%'; input.style.minWidth = '400px'; });
Best regards,
IsmaelAugust 29, 2025 at 5:58 pm #1488747Ismael,
I tested it on my pc and on my iphone. And the message came through.
I tried adjusting the width but the the iphone is very stubborn.
Well , it can’t be all perfect.Thanks for your help.
Kind regards
Chris-
This reply was modified 1 week, 5 days ago by
Chris mssn.
August 30, 2025 at 5:05 pm #1488777Hi,
When I check on Android and emulate in the browser the width looks good, I don’t have an iPhone and I think the others also use Android.
Do you want us to leave this open to see if we can find an iPhone, or shall we close this thread?Best regards,
MikeAugust 30, 2025 at 6:34 pm #1488779Thanks for helping out.
You can close this thread.Kind regards,
Chris
-
This reply was modified 2 weeks, 1 day ago by
-
AuthorPosts
- The topic ‘Fine tuning CF7 for Iphone – IOS’ is closed to new replies.