我构建一个将值传递给Concrete5的表单,我几乎就在那里,因为我能够获得一个值,而不是另一个,使用typeahead.js。
代码很简单,但是作为一个新手php开发人员,我似乎无法让它工作。我需要输入框中的值到$ school。 full_name是执行此操作的正确方法,并且完全正常,但我似乎无法使用所需的输入框为学校实现
<div>
<?php $full_name = 'akID[' . UserAttributeKey::getByHandle('full_name')->getAttributeKeyID() . '][value]'; ?>
<?php echo $form->label($full_name, t('Full Name')); ?>
<?php echo $form->text($full_name); ?>
</div>
<br/>
<div class="center-block" id="form">
<?php $school = 'akID[' . UserAttributeKey::getByHandle('school')->getAttributeKeyID() . '][value]; ?>]'; ?>
<?php echo $form->label($school, t('Please Select your School from the Dropdown Box.') )?><br/>
<form id="schoolForm" class="form-signin" role="form" method="post">
<input type=text id="<?php echo $school; ?>" name="<?php echo $school; ?>" class="form-control typeahead" placeholder="Enter Your School ">
</form>
</div>