Jump to content

Edit History

4presta

4presta

Bonjour.

        $selectedDefaultCountry = $this->context->country->id;
        $additionalFields['country'] = (new FormField)
        ->setName('country')
        ->setType('select') /* ->setType('countrySelect') */
        ->setLabel($this->l('Pays'))
        ->setRequired(true)
        ->setValue($selectedDefaultCountry);
        foreach ($countries as $country) {
            $additionalFields['country']->addAvailableValue(
                $country['id_country'],
                $country['name']
            );
        }

ps_customregistrationfields.zip

obrazek.thumb.png.c691cf369f36ea74f9b0f4242280004c.png

4presta

4presta

Bonjour.


        $selectedDefaultCountry = $this->context->country->id;
        $additionalFields['country'] = (new FormField)
        ->setName('country')
        ->setType('select')
        ->setLabel($this->l('Pays'))
        ->setRequired(true)
        ->setValue($selectedDefaultCountry);
        foreach ($countries as $country) {
            $additionalFields['country']->addAvailableValue(
                $country['id_country'],
                $country['name']
            );
        }

ps_customregistrationfields.zip

obrazek.thumb.png.c691cf369f36ea74f9b0f4242280004c.png

4presta

4presta

Bonjour.


        $selectedDefaultCountry = $this->context->country->id;
        $additionalFields['country'] = (new FormField)
        ->setName('country')
        ->setType('select')
        ->setLabel($this->l('Pays'))
        ->setRequired(true)
        ->setValue($selectedDefaultCountry);
        foreach ($countries as $country) {
            $additionalFields['country']->addAvailableValue(
                $country['id_country'],
                $country['name']
            );
        }

ps_customregistrationfields.zip

×
×
  • Create New...