pippoabc Posted July 15, 2020 Share Posted July 15, 2020 Salve questa è la parte di codice dei radiobutton del titolo social, a questi campi dovrei aggiungere l'id con valore = Value e uno dei 2 titoli (per esempio: Sig) dovrà essere checked di default, potete aiutarmi? public function getFormat() { $format = []; $genders = Gender::getGenders($this->language->id); if ($genders->count() > 0) { $genderField = (new FormField()) ->setName('id_gender') ->setType('radio-buttons') ->setLabel( $this->translator->trans( 'Social title', [], 'Shop.Forms.Labels' ) ); foreach ($genders as $gender) { $genderField->addAvailableValue($gender->id, $gender->name); } $format[$genderField->getName()] = $genderField; } Grazie 1000 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now