我需要在所有字段的标签(或标签中)旁边添加一个链接。我已经为下面的名称字段放置了我的 xml(将其扩展到其他字段应该很简单)。例如,在名称旁边应该有一个 html 链接。不能让它工作。请帮忙
这是我的xml:
<field name="name" type="text"
description=""
filter="string"
label="Full Name"
message="COM_USERS_REGISTER_NAME_MESSAGE"
required="true"
size="30"
class="signupbox"
/>
这是我的registration.php
<?php
/**
* @package Joomla.Site
* @subpackage com_users
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @since 1.6
*/
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.noframes');
?>
<style>.star{display:none;}#recaptcha_table{width: 505px;}input#recaptcha_response_field{;}</style>
<div style="font-size: 22px;margin-bottom:20px;border-bottom: solid 1px #ddd;padding-bottom: 3px;">Create an account at the Homeovitality Store.</div>
<div class="registration<?php echo $this->pageclass_sfx?>">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1><?php echo $this->escape($this->params->get('page_heading')); ?></h1>
<?php endif; ?>
<div id="signup-form">
<form id="member-registration" action="<?php echo JRoute::_('index.php?option=com_users&task=registration.register'); ?>" method="post" class="form-validate">
<?php foreach ($this->form->getFieldsets() as $fieldset): // Iterate through the form fieldsets and display each one.?>
<?php $fields = $this->form->getFieldset($fieldset->name);?>
<?php if (count($fields)):?>
<?php if (isset($fieldset->label)):// If the fieldset has a label set, display it as the legend.
?>
<?php endif;?>
<div>
<?php foreach($fields as $field):// Iterate through the fields in the set and display them.?>
<?php if ($field->hidden):// If the field is hidden, just display the input.?>
<?php echo $field->input;?>
<?php else:?>
<div style="margin-bottom:8px;">
<?php echo $field->label; ?>
</div>
<div style="margin-bottom:20px;"><?php echo ($field->type!='Spacer') ? $field->input : " "; ?></div>
<?php endif;?>
<?php endforeach;?>
</div>
<?php endif;?>
<?php endforeach;?>
<div id="agree-text">By clicking "Create my account" (below), you signify your agreement to the <a href="/legal/terms-and-conditions" target="_blank">terms & conditions</a>, <a href="/legal/disclaimer" target="_blank">disclaimer</a> and <a href="/legal/privacy-policy" target="_blank">privacy policy</a> (including the use of cookies).</div>
<div>
<div style="float:left;"><button type="submit" class="validate" id="createmyaccountbuttonbluelarge"></button></div>
<div style="font-size:12px;display:inline-block;margin-left:20px;padding-top: 9px;float: left;"><a href="/store/index.php?option=com_virtuemart&view=category&virtuemart_category_id=1&Itemid=104">Cancel account creation</a></div>
<input type="hidden" name="option" value="com_users" />
<input type="hidden" name="task" value="registration.register" />
<?php echo JHtml::_('form.token');?>
</div>
</form>
</div>
</div>