form.disable

0 views
Skip to first unread message

unomi

unread,
Oct 1, 2008, 6:35:39 AM10/1/08
to inputex

It would be nice if a disabled form would also have its submit button
disabled/hidden

this way we could use the same logic for simply displaying data and
having an editable form.
this would perhaps only apply for actual submit buttons, as I would
like to have a button button that says forexample 'edit' which would
simply display the submit button and enable the fields.


also how can i set a form to be disabled at the definition stage?

Thanks again

Eric Abouaf

unread,
Oct 1, 2008, 8:49:36 AM10/1/08
to inp...@googlegroups.com
True...
I just commited the fix.

To disable it at creation:
{type: 'form', inputParams: { disabled: true} }

For the 'edition' pattern, take a look at the inPlaceEdit field

unomi

unread,
Oct 2, 2008, 12:12:04 AM10/2/08
to inputex
dirtied this into form.js ;


this.renderButtons();
if (this.options.disabled)
{
this.disable();
}

as it wasn't working with the following format:

{$container}Form = new YAHOO.inputEx.Form( {
fields: [ $fields[fields] ],
disabled : "true",
buttons: [{type: 'submit', value: $submitLabel}$buttons],
parentEl: '$container',

one day i'll redo it all in JSONschema, but today is not the day :p
thanks again


On Oct 1, 7:49 pm, "Eric Abouaf" <eric.abo...@gmail.com> wrote:
> True...
> I just commited the fix.
>
> To disable it at creation:
> {type: 'form', inputParams: { disabled: true} }
>
> For the 'edition' pattern, take a look at the inPlaceEdit field
>

Eric Abouaf

unread,
Oct 2, 2008, 3:36:01 AM10/2/08
to inp...@googlegroups.com
Oooops...
thanks ! fixed..
Reply all
Reply to author
Forward
0 new messages