-
AuthorPosts
-
April 7, 2021 at 12:33 pm #1293053
Hi
I’m using a pop-up contact form (.class white-popup .mfp-hide) but since last Enfold update it doesn’t pop up anymore, it’s displayed always. What do I have to change so that the form is hidden but popping up on click?
ThanksApril 8, 2021 at 5:02 pm #1293334Hey,
Thanks for contacting us!
Could you please create temporary admin logins and post them here privately so we can look into it? :)
Best regards,
YigitApril 9, 2021 at 8:40 am #1293442Hi Yigit
Logins in the private field. Please tell me any modifications because I have to replicate these for another site too.April 9, 2021 at 11:42 am #1293484Hi,
Thanks for the logins!
You have 2 child themes. Style.css file is empty on active one and there are many modified files there.
Could we temporarily activate the other child theme for testing purposes? I believe the issue is in the child theme.Best regards,
YigitApril 9, 2021 at 1:29 pm #1293504Hi Yigit
I deleted the other child theme and regenerated the styles in the Enfold performance tab, but now the form remains completely hidden, even on click. I see a changelog file in /enfold/js/aviapopup with recent changes. Might these changes be a resaon?
Please go ahead with testing.April 12, 2021 at 2:18 pm #1293944Hi,
Thanks for the info!
I see you have only one child theme now but I still cannot see the content of both style.css and functions.php files. I would not like to edit the files from WP dashboard to avoid overwriting the files. Could you please post FTP logins here privately as well?In the meantime, I created a page with your contact form (1) and chose to hide header and footer in layout section and then I edited your product and added modal window by adding ?iframe=true to the link of contact page. Please see private content field below :)
I am still guessing the issue is related to files in your child theme however if this solution works for you, please use it instead as it is way easier to implement it :)
Best regards,
YigitApril 12, 2021 at 4:04 pm #1293966Hi Yigit
Indeed, I’m using a snipped in the child theme functions.php and a css-rule in style.css
functions.phpfunction popup_inline() { ?> <script type="text/javascript">jQuery(window).load(function(){jQuery('.open-popup-link').magnificPopup({type:'inline',midClick:!0})});</script> <?php } add_action('wp_head', 'popup_inline');
In style.css
.white-popup { position: relative; background: #FFF; padding: 20px; width: auto; max-width: 500px; margin: 20px auto; }
I’ve got it from here: https://kriesi.at/support/topic/contact-form-in-pop-up-prettyphoto-issue/#post-304173 and it worked fine before.
The iframe solution doesn’t look bad but if I’d have to change it for all products it’s quite a lot of work to do.
April 15, 2021 at 6:24 am #1294482Hi,
Thank you for the update.
We can see this error in the browser console, which might be causing the issue.
jquery.min.js:2 Uncaught TypeError: e.indexOf is not a function at S.fn.init.S.fn.load (jquery.min.js:2) at (index):161
Try to set the priority of the wp_head hook to 9999, or replace it with wp_footer.
Did you add other scripts aside from the lightbox snippet?
Best regards,
IsmaelApril 15, 2021 at 10:19 am #1294530Hi Ismael
Yes, I’ve seen the error too but I don’t know how to interprete the message. Your answer is cryptic for me too. How and where do I set priorities?
I’m pretty sure that only the the two modifications I mentioned in my last post affect the lightbox. But pretty sure isn’t 100% sure.
Best,
FIlzApril 18, 2021 at 6:04 am #1294958Hi,
Thanks for the update. You would set the priority as the third argument in add_action: https://developer.wordpress.org/reference/functions/add_action/, or try replacing wp_head with wp_footer.
Best regards,
RikardApril 18, 2021 at 11:08 am #1294976Hi Rikard
I’ve tried both modifications for the snipped in child theme functions.php:
function popup_inline() { ?> <script type="text/javascript">jQuery(window).load(function(){jQuery('.open-popup-link').magnificPopup({type:'inline',midClick:!0})});</script> <?php } add_action('wp_head', 'popup_inline', 999);
and
function popup_inline() { ?> <script type="text/javascript">jQuery(window).load(function(){jQuery('.open-popup-link').magnificPopup({type:'inline',midClick:!0})});</script> <?php } add_action('wp_footer', 'popup_inline');
but I don’t see an effect.
Can you please check, if the short code I’m using is causing it? Although I didn’t make any changes there.
<div id="test-popup" class="white-popup mfp-hide">[av_contact href=' (Email address hidden if logged out) ' title='Impressum' button='Senden' on_send='' sent='Dein E-Mail wurde versendet!' link='manually,http://' subject='Magiclift Impressum' autorespond='' captcha='' color='' custom_class='' av_uid='av-4a1e'] [av_contact_field label='Name' type='text' options='' check='is_empty' width='' av_uid='av-48pk2'][/av_contact_field] [av_contact_field label='E-Mail' type='text' options='' check='is_email' width='' av_uid='av-3qiji'][/av_contact_field] [av_contact_field label='Nachricht' type='textarea' options='' check='is_empty' width='' av_uid='av-3hwl6'][/av_contact_field] [/av_contact]</div> <a class="open-popup-link" href="#test-popup">Stelle uns eine Frage per E-Mail</a>
Thanks
- This reply was modified 3 years, 7 months ago by filz51.
April 20, 2021 at 1:53 pm #1295541Hi,
Thank you for the info.
We tried to modify the functions.php file but found it empty. Where did you add the snippet or the script?
Screenshot: https://imgur.com/PJX9uAz
Best regards,
IsmaelApril 20, 2021 at 5:27 pm #1295597Hi Ismael
When you access the functions.php-file over ftp you’d see that the file is not empty at all. How could this become inconsitent?
BTW: style.css was empty too in the theme editor. But when I open it with a text editor, 342 written lines show up.
However, I copied the content of the php-file into the functions.php of the theme editor. Can you see its content now?Best, Filz
April 21, 2021 at 8:08 am #1295712Hi,
Alright. We modified the functions.php file via FTP and replace wp_head with wp_footer hook as suggested above. There are also some invalid syntax in the file but we already corrected those. The popup is now working correctly but for some reason, it has no background. Did you remove it?
Thank you for your patience.
Best regards,
IsmaelApril 22, 2021 at 9:49 am #1295980Hi Ismael
Great, the forms are back but I never removed the background. How do I get it back? BTW: I updated the theme to its latest version.
And I have to replicate your changes on another live site. You made changes in the functions.php file only, didn’t you?
Thanks for your great support!
Best, FilzApril 26, 2021 at 7:27 am #1296677Hi,
No problem. Yes, all changes have been done in the functions.php file and displaying the contact form’s background back should be a matter of adding a few css modifications.
Best regards,
IsmaelApril 27, 2021 at 3:11 pm #1297010Hi Ismael
Thank you, the background is white again. Did you only add
#top fieldset { background-color: white !important; padding: 13px !important }
to Enfold Child > General Styling > Quick CSS?
I’m asking, because on the same page in French and English is still no white background on the contact form.
https://magiclift.de/fr/impressum/
https://magiclift.de/en/impressum/ I’m using WPML for the translations.What I did to apply it for those localizations too: I added the css code above to Quick CSS to the English and French Quick CSS Fields. In Enfold performance section I rectivated the combining-option for css files with unique timestamps and WP-Bug fix –> deactivated it again with unique timestamps and WP-Bug fix. I did this for both localizations, English and French. But it’s not applied.
Maybe you added additional code? I need to know because I have another website to modify.
It’s quite confusing, that in some cases modifications of style.css in Enfolds child theme folder over FTP doesn’t work for WPML translated pages.Thanks and best regards
- This reply was modified 3 years, 7 months ago by filz51.
April 29, 2021 at 11:04 am #1297300Hi,
Thank you for the update.
We do not remember adding that css code, but you can try adding it in the other languages’ General Styling > Quick CSS field, or in the child theme’s style.css file. To see the changes in the front end immediately, make sure that the Performance > File Compression settings for all languages are disabled or make sure to toggle it. And please purge the cache and do a hard refresh before checking the page.
Best regards,
IsmaelMay 7, 2021 at 2:43 pm #1298958Thanks Ismael
I could find a css solution on my own. All solved.
Best, FilzMay 10, 2021 at 6:12 am #1299259 -
AuthorPosts
- The topic ‘oop-up contact form’ is closed to new replies.