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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Is there a way to impliment form action="URL


Reply


2 Posts   889 Views

Avatar
Loopy

Community Member, 20 Posts

23 January 2012 at 2:53pm

Edited: 23/01/2012 2:56pm

Hi guys

Slowly finding ways to do various bits and pieces with Silverstripe but am stuck on this one. I need to build a form, but not one that searches for data in my silverstripe database.

I have an account with a partner site who are data service provider. They supply me with a piece of html code that I paste into the relevant position on a page on my site. When users select the relevant search terms from drop down boxes on the search field the snippet uses the expression

<form action="http://app.mysite/search/?suppliersite=account number" method="get">

This is followed by a table which details the form layout and drop down selection variables. When the user selects variables from drop down lists and presses search they are taken user to a page on my partners site that has my site header and colour scheme along with the search results.

The tutorial on forms seems straight forward enough but I can't figure out How to run "form action method get" statement. The forms function on ss looks like it is predicated around the ss database.

If it helps I have only installed the standard ss package and a theme that appears to be a modified version of Blackcandy. I have modified the theme to get the look I want but other than that everything is standard.

One possible solution would be to alter ss to allow all html tags and commands to be allowed in editor but as things stand if I cut and paste this into the editor it puts <p> tags on everyline.

Can anyone help on this?

Avatar
Plato

Community Member, 26 Posts

24 January 2012 at 9:32am

Edited: 24/01/2012 9:37am

$form->setFormAction('http://myPartnerService.com/blah');
$form->setFormMethod('GET');

http://api.silverstripe.org/2.4/forms/core/Form.html#methodsetFormAction

---

Fiddling with the WISIWYG gets messy fast, I don't recommend it :(

But if you really want to get into it:
http://www.ssbits.com/tutorials/2009/customising-the-wysywig-editor-in-v2-3-2-tinymce/
http://www.tinymce.com/wiki.php/Configuration