<?php

use yii\helpers\{ArrayHelper, Html};
use yii\widgets\ActiveForm;
use modules\custom\models\Accounts;
Use backend\models\Attributesvalues
/**
* @var  yii\web\View $this
* @var  modules\custom\models\Contacts $model
* @var  yii\widgets\ActiveForm $form
*/
?>

<div class="contacts-form">
	<?php $form = ActiveForm::begin(['id' => 'contact' ]); ?>  
	<table class="Table">
		<tr class="DarkerBlueC">
			<td colspan="3">Account</td>
		</tr>
		<tr>
			<td colspan="3"><?= $form->field($model, 'accountid')->dropDownList(Accounts::Active(), ['prompt' => 'Please Select'])->label(false)?></td>
			<td></td>
		</tr>
		<tr class="DarkerBlueC">
			<td>Firstname</td>
			<td colspan="2">Last Name</td>
		</tr>
		<tr>
			<td>
				<?= $form->field($model, 'firstname')->textInput(['maxlength' => 45])->label(false) ?>
			</td>
			<td colspan="2">
				<?= $form->field($model, 'lastname')->textInput(['maxlength' => 45])->label(false) ?>
			</td>
		</tr>
			<tr class="DarkerBlueC">
			<td colspan="2">Address 1</td>
			<td>Address 2</td>
		</tr>
		<tr>
			<td colspan="2"><?= $form->field($model, 'address1')->textInput(['maxlength' => 45])->label(false) ?></td>
			<td><?= $form->field($model, 'address2')->textInput(['maxlength' => 45])->label(false) ?></td>
		</tr>		<tr class="DarkerBlueC">
			<td>Town</td>
			<td>County
			</td>
			<td>Post Code</td>
		</tr>
		<tr>
			<td><?= $form->field($model, 'town')->textInput(['maxlength' => 45])->label(false) ?>			</td>
			<td><?= $form->field($model, 'county')->textInput(['maxlength' => 45])->label(false) ?>			</td>
		<td><?= $form->field($model, 'postcode')->textInput(['maxlength' => 45])->label(false) ?>		</td>
		</tr>		
		<tr class="DarkerBlueC">
			<td>Phone Number</td>
			<td>Mobile Number</td>
			<td>E-Mail Address</td>
		</tr>
		<tr>
			<td><?= $form->field($model, 'homephone')->textInput(['maxlength' => 45])->label(false) ?></td>
			<td><?= $form->field($model, 'mobileno')->textInput(['maxlength' => 45])->label(false) ?></td>
			<td><?= $form->field($model, 'email')->textInput(['maxlength' => 255])->label(false) ?></td>
		</tr>
		<tr>
			<th class="DarkerBlueC">Contact Type</th>
			<th class="DarkerBlueC">&nbsp;</th>
			<th class="DarkerBlueC">Status</th>
		</tr>
		<tr>
			<td><?= $form->field($model, 'contacttype')->dropDownList(Attributesvalues::formArray('contacttype')) ->label(false)?></td>
			<td>&nbsp;</td>
			<td><?= $form->field($model, 'status')->dropDownList(Attributesvalues::formArray('sys_status')) ->label(false)?></td>
		</tr>
	</table>
	<div class="form-group">
		<?= Html::submitButton('Save', ['class' => 'btn btn-primary']) ?>
	</div>
	<?php ActiveForm::end(); ?>
</div>
	