- This topic has 13 replies, 4 voices, and was last updated 4 years, 11 months ago by David.
-
AuthorPosts
-
March 25, 2019 at 6:09 am #849030Andrew
Hi, I’ve used the Hook element to add some fixed position CTAs sitewide (Call and Email buttons). I’m trying to add a modal popup for the Email button but am running into an error when I try to include a form in the popup, specifically the input submit part.
Am I going about this the right way? Do I need to use a shortcode for the form html?
March 25, 2019 at 7:12 am #849214DavidStaffCustomer SupportHi there,
how are you adding the form and does it work from within the normal editor?
March 25, 2019 at 7:41 am #849255AndrewHi David,
I’m adding the form as html into the content area of a hook element.
Appearance > Elements > New Hook
The code I add gets cut as soon as it reaches this line:
`<input style=”background-color:#cf6aa4;” class=”elementor-button” name=”submit” type=”submit” value=”Request a quote ” />
It also breaks the Edit Hook element page layout as well.
The form code I’m adding works fine in a custom html widget in the sidebar. e.g. https://www.healthy-weight.co.uk/gastric-band/
Thanks,
Andrew
March 25, 2019 at 3:53 pm #849717DavidStaffCustomer SupportIs the HTML in the Hook identical to that in the widget? Just want to make sure there isn’t any errors in the markup. Let me know.
March 26, 2019 at 2:55 am #850063AndrewHi, yes, same code.
March 26, 2019 at 3:11 am #850082DavidStaffCustomer SupportCould you share the HTML so i can do some tests?
When adding code you need to highlight it and use the Code button before submitting.March 26, 2019 at 6:19 am #850209AndrewThanks David,
Code removed
And now I’ve separated the following Javascript into a separate hook.
Code removed
March 26, 2019 at 6:31 am #850229AndrewI thought the offending line was the submit input line but it appears to be the closing textarea, presumably because the area I’m entering the code into is also a textarea.
Publishing the following hook…
<textarea>This is a textarea</textarea>
…results in the following being saved
<textarea>This is a textarea
Any solution for including a text area in a hook? I’m assuming shortcodes but again, if there’s another way to produce the desired outcome I’m all ears.
March 26, 2019 at 7:58 am #850473DavidStaffCustomer SupportYes, the textarea is the issue, looking into this, it could be a bug. I’ll update asap.
March 26, 2019 at 10:22 am #850611TomLead DeveloperLead DeveloperI tweaked this in 1.8.0-alpha.2, which we’re hoping to release tomorrow.
If you want to try the fix now, go to
wp-content/plugins/gp-premium/elements/class-metabox.php
and find this line:<textarea id="generate-element-content" name="_generate_element_content"><?php echo get_post_meta( get_the_ID(), '_generate_element_content', true ); ?></textarea>
And replace it with this:
<textarea id="generate-element-content" name="_generate_element_content"><?php echo esc_textarea( get_post_meta( get_the_ID(), '_generate_element_content', true ) ); ?></textarea>
Let me know if that fixes it for you or not π
March 27, 2019 at 2:04 am #851082AndrewHi Tom,
That has indeed fixed it. Thanks very much π
Andrew
March 27, 2019 at 8:24 am #851561TomLead DeveloperLead DeveloperNo problem π
May 22, 2019 at 2:40 am #907554Michael LoguidiceI am also trying to add a pop-up to my site… just wondering if this is done in Elements – header (type)?
the instructions from Mailchimp said: “Paste the code into your website’s HTML just before the closing < / head > tag.”
Thank you!
May 22, 2019 at 4:26 am #907641DavidStaffCustomer SupportHi there,
you would use the Hook Element to add the code. And select the
WP_Head
hook from the list. -
AuthorPosts
- You must be logged in to reply to this topic.