Jump to content
jt-espace

Champ text non-modifiable

Recommended Posts

Bonjour,

 

Comment rendre un champ de type text non-modifiable (grisé) dans un renderForm ?

Dans mon exemple (label Circuit), l'id s'affiche bien mais n'est pas grisé.

public function renderForm() {
        // loads current warehouse
        if (!($obj = $this->loadObject(true)))
            return;

        $this->fields_form = array(
            'legend' => array(
                'title' => $this->l('Ajout d\'une activité'),
                'image' => '../img/admin/bus-icon.png'
            ),
            'input' => array(
                array(
                    'type' => 'hidden',
                    'name' => 'id_address',
                ),
                array(
                    'type' => 'hidden',
                    'name' => 'id_product',
                ),
                array(
                    'type' => 'text',
                    'label' => $this->l('Circuit:'),
                    'name' => 'id_product',
                ),

...

Merci à vous.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More