Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Widgets /

Discuss SilverStripe Widgets.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Contact Form in a Widget


Go to End


9 Posts   8743 Views

Avatar
KeithLeslie

Community Member, 6 Posts

22 January 2009 at 4:42pm

How would I go about putting a contact us form inside a widget? Is it possible to execute php on a form post from inside a widget? Or better yet, is it possible to use Silverstripe forms inside a widget?

Avatar
Nivanka

Community Member, 400 Posts

24 January 2009 at 3:27pm

You can do this I think

see how the login widget is created, and try to hack around it. http://www.silverstripe.org/Log-in/

Avatar
Jedateach

Forum Moderator, 238 Posts

19 February 2009 at 11:40am

Heh, I made the login widget, which is just a hack itself.

It dosen't contain a Silverstripe form, but rather just submits to the Security controller I think.

This page tells you how to add a form to a widget:
http://doc.silverstripe.com/doku.php?id=widgets:forms&s=widget%20form

Unfortunately it does not work in SS 2.3 yet...

Avatar
Jedateach

Forum Moderator, 238 Posts

23 February 2009 at 3:52pm

Hey guys, I've now updated the widget forms docs with code that actually works. :D

http://doc.silverstripe.org/doku.php?id=widgets:forms

Avatar
Thomashv

Community Member, 35 Posts

25 July 2009 at 9:54am

Edited: 25/07/2009 6:38pm

I've tried to build a contact form widget based on this recipe. But I have some problems with the posting. I get the following error message:
Website Error
There has been an error

The website server has not been able to respond to your request.

I have created a topic wich includes my code here...

I would be pleased if some of you experts had some tips for me!! :)

Avatar
Heike-san

Community Member, 52 Posts

14 November 2009 at 6:21am

Thomas have you solved your problem since hten ? i have the same kind of problem for my widget and I would enjoy any hints on how all of you guys managed to solve this issue. 'Been on this issue for over three weeks now, the clients are not gonna be very happy!!

Avatar
Thomashv

Community Member, 35 Posts

18 November 2009 at 9:04pm

No sorry, I gave up on that. But I am reading the SilverStripe book now so hope that will increase my understanding to find out of this among other challenges I've met developing in SS. Will post it in this thread then. :)

Avatar
reececropley

Community Member, 11 Posts

4 February 2012 at 12:58am

Hello Thomas,

Have you managed to write a contact form widget yet?

Go to Top