src/Forms/Modules/Backend/TextfieldForm.php
private function AddTypeField()
    {
        $name = 'Type';
        $select = new Select($name, $this->textfield->GetType());
        $select->AddOption('', Trans('Core.PleaseSelect'));
        $values = TextfieldType::AllowedValues();
        foreach ($values as $value)
        {
            $select->AddOption($value, Trans('Forms.TextfieldType.' . ucfirst($value)));
        }
        $this->AddField($select);
        $this->SetRequired($name);
    }
private function AddTypeField()
    {
        $name = 'Type';
        $select = new Select($name, $this->textfield->GetType());
        $select->AddOption('', Trans('Core.PleaseSelect'));
        $values = TextfieldType::AllowedValues();
        foreach ($values as $value)
        {
            $select->AddOption($value, Trans('Forms.TextfieldType.' . ucfirst($value)));
        }
        $this->AddField($select);
        $this->SetRequired($name);
    }
private function AddTypeField ( ) { $ name = 'Type' ; $ select = new Select ( $ name , $ this -> textfield -> GetType ( ) ) ; $ select -> AddOption ( '' , Trans ( 'Core.PleaseSelect' ) ) ; $ values = TextfieldType :: AllowedValues ( ) ; foreach ( $ values as $ value ) { $ select -> AddOption ( $ value , Trans ( 'Forms.TextfieldType.' . ucfirst ( $ value ) ) ) ; } $ this -> AddField ( $ select ) ; $ this -> SetRequired ( $ name ) ; }
Adds the type field
Adds the type field