[TYPO3-project-formidable] How to confirm at client?

Thomas Schikarski tsc at tsc-beratung.de
Wed Jul 2 14:17:33 CEST 2008


Hy Loredana,

thanks a lot. It works fine.

"$this->sendToPage($this->toWebPath($sLink)" was the missing information.

Do you have any hints for me, how I can get familiar with all of those 
methods of the formidable object? Is there any documentation, I 
overlooked so far? (So far, I only know of http://formidable.typo3.ug/, 
the WIKI, and the doxygen pages.)

Otherwise, I probably should scan through the source code of the the 
tx_ameosformidable class, shouldn't I?

Thanks again, best regards, Thomas

Loredana ZECA wrote:
> 
> Hy Thomas,
> 
> 
> You can try this one:
> 
> <renderlet:BUTTON name="btnClose" label="Close">
>     <onclick runat="server">
>         <confirm>Are you sure you want to close without saving your 
> changes?</confirm>
>         <userobj>
>             <php><![CDATA[/*<?php*/
> 
>                 $sLink = $this->cObj->typolink_URL(
>                     array(
>                         "parameter" => 16,
>                         "returnLast" => "url",
>                         "useCacheHash" => "1",
>                     )
>                 );
>                 return $this->sendToPage($this->toWebPath($sLink));
> 
>             /*?>*/]]></php>
>         </userobj>
>     </onclick>
> </renderlet:BUTTON>
> 
> 
> You can use a <renderlet:BUTTON>, instead of <renderlet:SUBMIT>.
> 
> The control <renderlet:SUBMIT> are executing the saves on form, but 
> <renderlet:BUTTON> not, only if you are specifing them explicitly.
> 
> So, I hope this will help you.
> 
> Regards,
> Loredana
> 
> 
> 
> Thomas Schikarski a écrit :
>> Hi everybody,
>>
>> I'm stuck at some point building a CRUD form.
>>
>> I need a button that allows to close the edit form without saving 
>> changes, similar to this one:
>>
>> <renderlet:SUBMIT name="btn-close" label="Close" mode="clear" />
>>
>> However, I like to present a query box for confirmation: "Are you sure 
>> you want to close without saving your changes?"
>>
>> Is this possible using something like the following XML inside the 
>> renderlet:SUBMIT?
>>
>>     <onclick runat="client">
>>         <confirm>
>>             <userobj>
>>                                ... // should present query box like
>>                     // javascript:confirm('...');
>>                        </userobj>
>>         </confirm>
>>         <userobj>
>>
>>             ... // should submit the form with mode="clear",
>>                 // in case of "OK" click
>>
>>         </userobj>
>>     </onclick>
>>
>> What do I have to put inside the <userobj> tags? Majix-Events? 
>> Javascript? PHP? Return value?
>>
>> Any better ideas?
>>
>> Best regards and many thanks in advance!


More information about the TYPO3-project-formidable mailing list