【发布时间】:2017-02-23 13:00:23
【问题描述】:
$fields_form = array(
'form' => array(
'legend' => array(
'title' => $this->l('Configure Settings'),
'icon' => 'icon-cogs'
),
'description' => $form_desc,
'input' => array(
array(
'type' => 'text',
'label' => $this->l('textfield1'),
'name' => 'username',
'size' => 50,
'class' => 'fixed-width-xxl',
'required' => true
),
array(
'type' => 'password',
'label' => $this->l('textfield2'),
'name' => 'password',
'size' => 50,
'class' => 'fixed-width-xl',
'required' => true,
),
),
'submit' => array(
'name' => 'submitconfigureoptions',
'title' => $this->l('Save'),
'icon' => 'process-icon-save',
'class' => 'btn btn-default pull-right'
),
)
);
我有一个包含四个输入文本字段和一个提交按钮的表单。因此,提交表单后,我在输入文本字段中输入的相同值必须在页面刷新后显示在表单中。
【问题讨论】:
-
在这种情况下,您可以将字段保存在本地存储中并可以显示。如果您能提供您的代码,将会很有帮助。
标签: forms prestashop-1.7