<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Forum posts to 'Archive'</title>
		<link>http://www.silverstripe.org/archive/rss</link>
		<atom:link href="http://www.silverstripe.org/archive/rss" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>Re: Completely lost on Ajax forms</title>
			<link>http://www.silverstripe.org/archive/show/49254?start=0#post50427</link>
			<description>&lt;p&gt;AjaxFormAction is only used in specific cms interfaces, we're discussing deprecating it in a sapphire-framework-context, see &lt;a href=&quot;http://open.silverstripe.com/ticket/2353&quot;&gt;http://open.silverstripe.com/ticket/2353&lt;/a&gt;&lt;/p&gt;&lt;p&gt;PageCommentInterface.js is a good start, you just need basic PrototypeJS functionality to achieve what you're trying to do: &lt;a href=&quot;http://prototypejs.org/api/ajax/request&quot;&gt;http://prototypejs.org/api/ajax/request&lt;/a&gt;&lt;/p&gt;&lt;p&gt;You can still use the FormResponse class, just make sure you evaluate the ajax-response rather than simply outputting it (we have a little wrapper called Ajax.Evaluator for this)&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Completely lost on Ajax forms &lt;a href=&quot;http://www.silverstripe.org/archive/show/49254?start=0#post50427&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/49254?start=0#post50427&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Tue, 01 Apr 2008 10:31:37 +1300</pubDate>
			<dc:creator>Ingo</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/49254?start=0#post50427</guid>
		</item>
		
		<item>
			<title>Re: Completely lost on Ajax forms</title>
			<link>http://www.silverstripe.org/archive/show/49254?start=0#post50235</link>
			<description>&lt;p&gt;Is this just a matter of copying the PageCommentInterface.js example or is there an easier &quot;built-in&quot; method?&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Completely lost on Ajax forms &lt;a href=&quot;http://www.silverstripe.org/archive/show/49254?start=0#post50235&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/49254?start=0#post50235&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Mon, 31 Mar 2008 18:24:03 +1300</pubDate>
			<dc:creator>piksel</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/49254?start=0#post50235</guid>
		</item>
		
		<item>
			<title>Completely lost on Ajax forms</title>
			<link>http://www.silverstripe.org/archive/show/49254#post49254</link>
			<description>&lt;p&gt;I have not been able to figure out how to get a form to submit using Ajax. There is mention of using a FormResponse object &lt;a href=&quot;http://doc.silverstripe.com/doku.php?id=recipes:forms#adding_ajax-behaviour_to_your_forms&quot;&gt;here&lt;/a&gt;. But then there is no documentation for it.&lt;/p&gt;&lt;p&gt;I have this in my Page_Controller class (NB: Haven't even started on DataObject stuff yet - just want to see this submitting via ajax):&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;function ContactUsForm() {&lt;br /&gt;      // Create fields&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;      $fields = new FieldSet(&lt;br /&gt;         new TextField('FirstName', 'Name', 'Name'),&lt;br /&gt;         new EmailField('Email', 'Email', 'Email'),&lt;br /&gt;         new TextField('Phone', 'Phone No.', 'Phone No.'),&lt;br /&gt;         new CheckboxField('Brochure', 'Email me a brochure'),&lt;br /&gt;         new CheckboxField('Call', 'Please call me'),&lt;br /&gt;         new CheckboxField('Newsletter', 'Sign me up for e-newsletter')&lt;br /&gt;      );&lt;/p&gt;&lt;p&gt;      // Create actions&lt;br /&gt;      $actions = new FieldSet(&lt;br /&gt;        new AjaxFormAction('doContactUsForm', 'Submit'),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;new ResetFormAction('doCloseContactUsForm', 'Close')&lt;br /&gt;      ); &lt;br /&gt;      $reqdFields = new RequiredFields(&quot;Email&quot;, &quot;FirstName&quot;); &lt;br /&gt;      return new Form($this, 'ContactUsForm', $fields, $actions);//, $reqdFields);&lt;br /&gt;   }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;   function doContactUsForm($data, $form) {&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;      // your form actions&lt;br /&gt;      FormResponse::update_dom_id('ContactFormLiner', '&amp;lt;p&amp;gt;DONE&amp;lt;/p&amp;gt;');&lt;br /&gt;      FormResponse::status_message('Done', 'good');        &lt;br /&gt;      // will automatically show the status-message if called by ajax, or redirect on a normal HTTP-request&lt;br /&gt;      return FormResponse::respond();&lt;br /&gt;    }&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Completely lost on Ajax forms &lt;a href=&quot;http://www.silverstripe.org/archive/show/49254#post49254&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/show/49254#post49254&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 28 Mar 2008 13:25:47 +1300</pubDate>
			<dc:creator>piksel</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/49254#post49254</guid>
		</item>
		

	</channel>
</rss>