2

I'd like to add a form/profile in a footer or sidebar widget.

I tried the Shortcode Widget plugin recommended in a Jan'18 question and placed the widget in the left column of a footer, but the form doesn't appear. I'm WP 4.9.8 and Civi 4.7.29, and here is the shortcode I put in the widget: [civicrm component="profile" gid="17" mode="create" hijack="0"]. The test shortcode "[shortcode_widget_test]" does work, so it seems to be a Civi-related problem (?).

I also saw a question from 2016 that suggested using an HTML form snippet: "Go to Administer CiviCRM > Profiles, then HTML Form Snippet under 'more' for your chosen snippet. Copy all the code there and paste it into your text widget." but I don't have that option under "more".

Can anyone help? Thx!

1

The HTML Form Snippet option will be available for profiles if the Accept profile submissions from external sites option has been set to yes –

Administer > System Settings > Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)

enter image description here

enter image description here

  • Wow, Anil, that worked, thx! Two questions: 1) what vulnerabilities do I open up with this setting? 2) how do I get this form/profile embedded in the widget to use the styling of the theme I'm using for the website (like it does when placed on a page thru a shortcode)? – Ruth D Dec 16 '18 at 20:15
  • Actually, let me revise #2 above - I see that this snippet has actually overridden my theme's style even for profiles placed on a page thru a shortcode. Do I need to change or delete those stylesheet links I see in the snippet? – Ruth D Dec 16 '18 at 20:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.