-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 smellycat37 escribió: > charki ezziani : I want to see the field value in my html form... I > just want to render it not modiabled... > Mr_chon : I try on a field type varchar(30) and it doesn't work too... > config: > actions: ~ > fields: > name: {params: disabled=true} > list: > display: [id, name, weighting, created_at, updated_at, > published] > filter: > class: false > #display: [name] > form: ~ > edit: > display: > main: [published, updated_at, created_at] > display: [name, weighting, imported] > new: ~ > > On 9 sep, 15:17, Mr_chon <shnd...@gmail.com> wrote: >> Hi, >> >> I'm not sure you can use the disabled param for dates. >> If all you want is to display those dates, you could set their type as >> "plain". >> >> your fields part would be like this : >> >> fields: >> created_at: { type: plain } >> >> On Sep 9, 12:59 pm, smellycat37 <charley.mail...@gmail.com> wrote: >> >>> hi, >>> I try to use the symfony admin generator, do you know how disable a >>> field in a the form? >>> I tried this in the generator.yml file but it doesn't work : >>> config: >>> actions: ~ >>> fields: >>> created_at: {params: disabled=true} >>> updated_at: {params: disabled=true} >>> list: >>> display: [id, name, weighting, created_at, updated_at, >>> published] >>> filter: >>> class: false >>> #display: [name] >>> form: ~ >>> edit: >>> display: >>> main: [published, updated_at, created_at] >>> display: [name, weighting, imported] >>> new: ~ >>> Good bye, > > Actually, those settings now ought to be defined in the Form class you're using in the module..
For example: [php] // In your form's configure() method $this->getWidget('created_at')->setAttribute('disabled', 'disabled'); $this->getWidget('updated_at')->setAttribute('disabled', 'disabled'); // ... [/php] - -- José Nahuel Cuesta Luengo Desarrollo | CeSPI - UNLP <ncue...@cespi.unlp.edu.ar> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqnsBkACgkQ2jTpOyePgAHNOgCfY24IyMx5bQ75c6MO58Gbb4JH PMkAnA1mHDqhF95kAthNZVueqUwbzkL4 =3Xc8 -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---