[TYPO3-project-formidable] New option: Disable INPUTs

Manuel Rego Casasnovas mrego at igalia.com
Tue Jul 3 14:01:26 CEST 2007


Hi Luc,

I think that is better have a new option for this, because if you want
to use an userobj call for the property disabled, you have to put an
userobj in the custom tag, but maybe you want to add some style (for
example a class name) in the custom tag.
With this new option you haven't any problem:
<disabled>
    <userobj>
       ...
    </userobj>
</disabled>
<custom>class="my_class"</custom>

Bye,
   Rego

-- 
Manuel Rego Casasnovas
Computer Science Engineer
mailto:mrego at igalia.com
Tel: +34 986 10 76 10
Fax: +34 981 91 39 49
Igalia - http://www.igalia.com

Luc Muller escribió:
> Hi Manel.
>
> I think That you could have used hte <custom> tag.
> As it is used to add params to the tag (mainly css classes but could be 
> desiable)
> like this : <custom>disabled="disabled"</custom> it should have worked as 
> Well.
>
> but it can make sense to have a special tag to disable the input...
>
> Luc
>
> "Manuel Rego Casasnovas" <mrego at igalia.com> a �crit dans le message de news: 
> mailman.584.1183462773.29892.typo3-project-formidable at lists.netfielders.de...
>   
>> Hello.
>>
>> I need a new option to can disable some INPUTs in my forms.
>>
>> For this I've added a little function in formidable_mainrenderlet class,
>> and I've modified a bit the getAddInputParams function at line 202
>> (http://test.kunstvaerker.dk/html/class_8mainrenderlet_8php-source.html#l00202).
>>
>> Next the source code:
>>        function _getAddInputParams() {
>>            return " " . $this->_getCustom() . " " . $this->_getEvents()
>> . " " . $this->_getDisabled() . " ";
>>        }
>>
>>        function _getDisabled() {
>>
>>            if ($this->oForm->_defaultFalse("/disabled/",
>> $this->aElement)) {
>>                return "disabled=\"disabled\"";
>>            }
>>
>>            return "";
>>        }
>>
>> Now I can use a new property disabled in my forms, in the XML config like:
>> <renderlet:TYPE name="myrdt">
>>   <disabled>true</disabled>
>> </renderlet:TYPE>
>>
>> You can add this new feature in the next FORMidable releases.
>>
>> Best regards,
>>   Rego
>>
>> -- 
>> Manuel Rego Casasnovas
>> Computer Science Engineer
>> mailto:mrego at igalia.com
>> Tel: +34 986 10 76 10
>> Fax: +34 981 91 39 49
>> Igalia - http://www.igalia.com 
>>     
>
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable


More information about the TYPO3-project-formidable mailing list