我正在使用 Bootstrap 3 和 Magento 构建一个注册页面,我只是想知道以下行的作用/输出:
<?php echo $this->getChildHtml('form_fields_before')?>
我是在下面的布局中正确使用它(在表单字段开始之前)还是应该在表单上的其他地方使用它?
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
<input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
<div class="row">
<div class="col-xs-12">
<h2><?php echo $this->__('New Customer Registration') ?></h2>
<p><?php echo $this->__('To register for an account on our website please fill in & submit the form below.') ?></p>
<?php echo $this->getChildHtml('form_fields_before')?>
<h3 class="legend"><?php echo $this->__('Personal Information') ?></h3>
<?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
<h3 class="legend"><?php echo $this->__('Login Information') ?></h3>
<div class="form-group">
<label for="email_address" class="required"><?php echo $this->__('Email Address *') ?></label>
<input type="text" name="email" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" id="email_address" class="form-control required-entry validate-email" title="<?php echo $this->htmlEscape($this->getEmailValue()) ?>" placeholder="Email" />
</div>
<div class="form-group">
<label for="password" class="required"><?php echo $this->__('Password *') ?></label>
<input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="form-control required-entry validate-password" placeholder="Password" />
</div>
<div class="form-group">
<label for="confirmation" class="required"><?php echo $this->__('Confirm Password *') ?></label>
<input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="form-control required-entry validate-cpassword" placeholder="Confirm" />
</div>