CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • Embedd a Petition to Website (Wordpress)
Pages: [1]

Author Topic: Embedd a Petition to Website (Wordpress)  (Read 4742 times)

dirk

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: WordPress 3.21
  • MySQL version: 5
  • PHP version: 5
Embedd a Petition to Website (Wordpress)
November 03, 2011, 10:57:25 am
Hi,
Is there a way to get an HTML-Code to emdedd a Petition on my website, like it works with profiles?
I Don't want to integrate the link but the whole Petition!
Greets, Dirk

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Embedd a Petition to Website (Wordpress)
November 04, 2011, 02:03:41 am
Hi,

You can use an iframe. From the top of my head, you take the url of the signature form page, add &snippet=1 and it should give you the form ready to embed.

I seem to remember the website you embed the page into have to have jquery loaded in the page.
X+

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

dirk

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: WordPress 3.21
  • MySQL version: 5
  • PHP version: 5
Re: Embedd a Petition to Website (Wordpress)
November 08, 2011, 01:53:04 am
Hi Xavier,
thanks for that hint. That works (even it's not looking great ;-(). Do you have an idea how to get rid of the head of the CiviPetition-page like the headlien and the links to just hve the form on the site?
Greets, Dirk

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Embedd a Petition to Website (Wordpress)
November 08, 2011, 02:58:27 am
Can you put a  screenshot, not sure I undersand what you mean.

What's the url of the petition with &snippet=1 ?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

dirk

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: WordPress 3.21
  • MySQL version: 5
  • PHP version: 5
Re: Embedd a Petition to Website (Wordpress)
November 08, 2011, 06:05:16 am
Hi Xavier,
here my screenshot (it's a german site) and the url is: http://crm.gemeingut.org/civicrm/petition/sign?sid=1&reset=1&snippet=1

What I mean ist the black area above the form, where usually the civicrm-menu is located and the title of the petition (which is actual twice on the page). I also dont like the horizontal scrollbar...
« Last Edit: November 08, 2011, 06:08:33 am by dirk »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Embedd a Petition to Website (Wordpress)
November 08, 2011, 06:20:48 am
Hi,

It must be your page setting some layout (assuming you're on the same domain name?). If you look at the page itself (url you gave) then it's empty.

tweak the css and it will work (and an id to the iframe and write css selectors to override the default layout)

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

dirk

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: WordPress 3.21
  • MySQL version: 5
  • PHP version: 5
Re: Embedd a Petition to Website (Wordpress)
November 08, 2011, 07:07:35 am
Hi,
I'm not sure, what you mean: "tweak the css" ??? ? I'm sorry, I have not enough experience in html and css  :( I can see the Profile without any formats around when I use the link, yes. But what to do to get rid of this, in my website?
civicrm and wordpress are not on the same server! civi is embedded in drupal, we don't use. Wordpress and its design) is somewhere else...

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Embedd a Petition to Website (Wordpress)
November 08, 2011, 07:32:57 am
Hi,

I meant that we reached the limit of what can be done by sharing url and screenshots. You should ask your web developer to push it the last bit, probably something that can be changed and updated quickly when you have access to the server.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

dirk

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: WordPress 3.21
  • MySQL version: 5
  • PHP version: 5
Re: Embedd a Petition to Website (Wordpress)
November 08, 2011, 07:39:56 am
Ok, thanks so far. I have to ask somebody else  ::)

fuerst

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal 6
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Embedd a Petition to Website (Wordpress)
November 17, 2011, 07:46:25 am
You can solve that easy by using the Drupal module Theme Key (http://drupal.org/project/themekey). Configure the module to switch to a simple theme when drupal:path is equal to civicrm/petition/sign. Same for the paths civicrm/petition/thankyou and civicrm/petition/confirm.

Usable simple themes are for instance Stark (http://drupal.org/project/stark) or Sky (http://drupal.org/project/sky). Don't forget to switch of Logo etc. in the theme settings.
« Last Edit: November 17, 2011, 07:54:00 am by fuerst »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Embedd a Petition to Website (Wordpress)
November 17, 2011, 09:30:52 am
Hi,

Don't think the problem is of the theme (the embedded form is already chromeless using snippet=1). The issue is that the main theme is applied to the iframe content I think. It needs to be overridded.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

dirk

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: WordPress 3.21
  • MySQL version: 5
  • PHP version: 5
Re: Embedd a Petition to Website (Wordpress)
January 02, 2012, 08:29:29 am
Hello again,
could anybody tell me, where I can edit the template which is used for the profile? The vertical order and appearance of the fielddescription is not really nice and i want to change it, so for example the inputboxes of "Vorname" and "Nachname" or "Postleitzahl" and "Ort" are in one line, to get it more compact and I can resize the boxes.
Thanx, Dirk

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Embedd a Petition to Website (Wordpress)
January 02, 2012, 05:16:54 pm

Check:

http://book.civicrm.org/developer/
http://book.civicrm.org/developer/techniques/templates

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • Embedd a Petition to Website (Wordpress)

This forum was archived on 2017-11-26.