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.

Archive /

Our old forums are still available as a read-only archive.

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

Implementing complicated form in CMS Admin


Go to End


7 Posts   1847 Views

Avatar
Double-A-Ron

Community Member, 607 Posts

1 September 2008 at 4:05pm

Edited: 02/09/2008 12:26pm

Hi All,

I have a rather complicated form that I need to add to Silverstripe. Adding the fields is no problem, but for this one, I need to be able to position them exactly as I have here.

Does anyone have any ideas on how to achieve this? Adding a custom form and an iframe to hold it in the cms (with it's own submit button) is definately an option, but I don't even know how to do that.

Cheers
Aaron

Avatar
Double-A-Ron

Community Member, 607 Posts

1 September 2008 at 4:06pm

Sorry - here is the screenshot

Avatar
Liam

Community Member, 470 Posts

2 September 2008 at 1:59am

Edited: 02/09/2008 2:01am

You can do this with a custom template, no need for iframe really.

Take a look here - http://doc.silverstripe.com/doku.php?id=form#using_a_custom_template

Basically you'll have to write your own form and not build one in the admin CMS area.

If you're looking at having the form show up in the admin area, not sure that is possible with a user defined form/custom template, though as I'm writing this I think I might have read something in the forums on that once. Maybe a developer can shed more light.

Avatar
Double-A-Ron

Community Member, 607 Posts

2 September 2008 at 8:01am

Thanks LeeUmm,

But this is for the admin only. The data is displayed in a table on the site itself.

So still looking for ideas here.

Aaron

Avatar
Double-A-Ron

Community Member, 607 Posts

2 September 2008 at 1:45pm

After examining the code, there doesn't look like there will be an easy way to add fields in this structure to Silverstripe itself.

So I guess the only option is to make a custom PHP form, and have it load in an iFrame within the admin. (even a link and/or popup will do the trick)

I have scoured the forums and Doku all morning, but found nothing. Does anyone know how something like this can be achieved?

Cheers
Aaron

Avatar
Double-A-Ron

Community Member, 607 Posts

9 September 2008 at 8:11am

Sorted it myself

Avatar
dio5

Community Member, 501 Posts

10 September 2008 at 8:48am

How? :-)