Quick links: Content - sections - sub sections
EN FR
Quick Search Advanced search
 
Page

  [Opened] [Résolu] $form->getControl('card_number')->readonly

Posted by scrasch on 05/11/2011 19:39

Bonjour,

    De la même manière que l'on peut faire : @@$form->getControl('card_number')->label = 'monLabel';@@, J'aimerais faire @@$form->getControl('card_number')->readonly = true;@@ mais apparemment, ce n'est pas la bonne syntaxe. Quelle est la bonne?

Cordialement,

Thomas

  [Opened] $form->getControl('card_number')->readonly

Reply #1 Posted by foxmask on 05/11/2011 21:17

->setReadOnly ?


@GitHub - Forum HaveFnuBB! powered by Jelix - Le Booster Jelix !

  [Opened] Re: $form->getControl('card_number')->readonly

Reply #2 Posted by scrasch on 05/11/2011 22:20

Merci, Je ne l'avais pas trouvé!

  [Opened] Re: $form->getControl('card_number')->readonly

Reply #3 Posted by scrasch on 05/11/2011 22:25

Non, $form->getControl('card_number')->setReadOnly = true; ne marche pas! Est-ce que ->setReadOnly est sur?

  [Opened] $form->getControl('card_number')->readonly

Reply #4 Posted by foxmask on 05/12/2011 09:18

bonjour,

un petit coup d'oeil sur l'API montre ceci :

$form->getControl('login')->setReadOnly('login',true);

un exemple sot de mettre de login de son form en readonly :)


@GitHub - Forum HaveFnuBB! powered by Jelix - Le Booster Jelix !

  [Opened] $form->getControl('card_number')->readonly

Reply #5 Posted by scrasch on 05/12/2011 13:07

Je ne maitrise pas encore l'API :) Merci!

  [Opened] [Résolu] $form->getControl('card_number')->readonly

Reply #6 Posted by laurentj on 05/12/2011 13:44

Bonjour,

je dirais plutôt (de tête) :

$form->getControl('login')->setReadOnly(true);

ou

$form->setReadOnly('login',true);
 
Page
  1. label et caractère html[Resolu] >
  2. [Résolu] $form->getControl('card_number')->readonly