Hi @pc87
I hope you’re well today!
je remercie ‘Adam’ qui à résolu mon problème ‘forminator pour le rôle utilisateur editeur’
I’m happy I could help 🙂
j’ai un autre problème mettre un iframe dans le champ html
j’ai trouvé ceci mais cela plante wordpress
I checked and the code shared in this linked article is fine, it should work correctly.
But there are two issues:
1. I noticed that when copy-pasting that code there are some problems with character encoding, replacing some characters incorrectly – that is causing fatal errors out of the box
2. when putting iframe code into that code, you need to pay a lot of attention to double- and single quotes/apostrophes inside iframe code. This is very “fragile” and can cause issues that are difficult to troubleshoot.
With that said, please try copying the code from here (instead of that article). It’s the same code but with corrected characters:
<?php
function forminator_append_gmap() {
?>
<script type="text/javascript">
jQuery(function($) {
$('#html-1').append('IFRAME CODE HERE');
});
</script>
<?php
}
add_action( 'wp_footer', 'forminator_append_gmap', 99 );
If it still doesn’t work, please also share (preferably put at https://pastebin.com and include link to it in response below) your iframe code that you want to use.
We’ll look into it closer then.
Best regards,
Adam
Thread Starter
pc87
(@pc87)
je vous remercie pour votre réponse rapide
j’ai suivi vos conseils en prenant votre code
j’ai cette erreur
Demande non valide vous n’êtes pas autorisé à effectuer cette action
<?php
function forminator_append_gmap() {
?>
<script type="text/javascript">
jQuery(function($) {
$('#html-1').append('<iframe id="haWidget" allowtransparency="true" scrolling="auto" src="https://www.helloasso.com/associations/l-oasis-maison-des-familles/formulaires/2/widget" style="width: 100%; height: 750px; border: none;"></iframe>');
});
</script>
<?php
}
add_action( 'wp_footer', 'forminator_append_gmap', 99 );
le nom du fichier est forminator-iframe.php
cordialement
pierre
Thread Starter
pc87
(@pc87)
j’ai corrigé en enlevant les ‘ dans le append
je n’ai plus le message d’erreur, mais cela ne fonctionne pas
Thread Starter
pc87
(@pc87)
bonjour
Natalia de WordPress m’a apporté une solution
Hi there!
This is Natalia here, thank you for reaching out to us. I hope you are doing well.
Glad to hear that you are interested in our Forminator plugin.
Currently, the plugin doesn't include a direct integration with iframe but you can create a shortcode with the script, and use that instead.
If you're adding a shortcode to an HTML field, you'll want to add a filter first: https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#html-field
This plugin is super-handy for creating custom shortcodes if you need it: https://ww.wp.xz.cn/plugins/shortcoder/
If you need further assistance with this we will recommend contacting our support team via the WordPress forums or if you are interested we can offer you a 7-day free trial in one of our full memberships this will give you acces to the Pro version of Forminator and our 24/7 Live Chat support. How does it sound?
Looking forward to your reply.
Best regards,
How would you rate me?
GreatOkayNot Good
If you still need help, please message me back.
Natalia
Account & Sales | We're hiring!
que j’ai mis en place avec un vif succés, j’ai créé des shortcode
merci à tous
cordialement
Pierre