【发布时间】:2016-10-26 08:19:12
【问题描述】:
我有一个客户在 Photoshop 上设计的模板。我的审问...当我看到模板时:我可以并排放置 2 个字段吗?我希望 f_firstname 和 f_lastname 在一行中...无论如何可以注入带有诸如 ex 之类的标签或一段代码:div="column1of2" $field_here close div 为 2 个字段设置 2 列?
实际上,生成每个字段的代码都位于不同的行上。那不是很漂亮。可能吗?
我有这个代码:
private static $allowed_actions = array(
'FormInfolettre'
);
public function FormInfolettre() {
$fields = new FieldList(
EmailField::create('f_email', 'Votre courriel'),
TextField::create('f_firstname', 'Votre prénom'),
TextField::create('f_lastname', 'Votre nom'),
TextField::create('f_message', 'Votremessage'),
);
$actions = new FieldList(
FormAction::create("Soumettre")->setTitle("Soumettre")
);
$required = new RequiredFields(
array(
'f_email',
'f_firstname',
'f_lastname',
'f_message',
));
$form = new Form($this, 'FormInfolettre', $fields, $actions, $required);
return $form;
}
【问题讨论】:
标签: css forms styles customization silverstripe