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

Manuel Rego Casasnovas mrego at igalia.com
Tue Jul 3 13:39:28 CEST 2007


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


More information about the TYPO3-project-formidable mailing list