
<div class="form-group row <?php echo e($errors->has('amphurs_id') ? 'has-error' : ''); ?>">
    <label for="amphurs_id" class="col-md-2 control-label">รหัสอำเภอ</label>
    <div class="col-md-4">
        <select class="form-control" id="amphurs_id" name="amphurs_id" required="true">
        	    <option value="" style="display: none;" <?php echo e(old('amphurs_id', optional($tambon)->amphurs_id ?: '') == '' ? 'selected' : ''); ?> disabled selected>ระบุ รหัสอำเภอ</option>
        	<?php $__currentLoopData = $amphurs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $amphur): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
			    <option value="<?php echo e($key); ?>" <?php echo e(old('amphurs_id', optional($tambon)->amphurs_id) == $key ? 'selected' : ''); ?>>
			    	<?php echo e($amphur); ?>

			    </option>
			<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
        
        <?php echo $errors->first('amphurs_id', '<p class="form-text text-muted">:message</p>'); ?>

    </div>
</div>

<div class="form-group row <?php echo e($errors->has('name') ? 'has-error' : ''); ?>">
    <label for="name" class="col-md-2 control-label">ชื่อตำบล(ไทย)</label>
    <div class="col-md-4">
        <input class="form-control" name="name" type="text" id="name" value="<?php echo e(old('name', optional($tambon)->name)); ?>" maxlength="75" placeholder="ระบุ ชื่อตำบล(ไทย)">
        <?php echo $errors->first('name', '<p class="form-text text-muted">:message</p>'); ?>

    </div>
</div>

<div class="form-group row <?php echo e($errors->has('electorates_id') ? 'has-error' : ''); ?>">
    <label for="electorates_id" class="col-md-2 control-label">เขตเลือกตั้ง</label>
    <div class="col-md-4">
        <select class="form-control" id="electorates_id" name="electorates_id" required="true">
        	    <option value="" style="display: none;" <?php echo e(old('electorates_id', optional($tambon)->electorates_id ?: '') == '' ? 'selected' : ''); ?> disabled selected>ระบุ เขตเลือกตั้ง</option>
        	<?php $__currentLoopData = $electorates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $electorate): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
			    <option value="<?php echo e($key); ?>" <?php echo e(old('electorates_id', optional($tambon)->electorates_id) == $key ? 'selected' : ''); ?>>
			    	<?php echo e($electorate); ?>

			    </option>
			<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
        
        <?php echo $errors->first('electorates_id', '<p class="form-text text-muted">:message</p>'); ?>

    </div>
</div>

<?php /**PATH D:\xampp7.4R1\htdocs\disk8\election\source\resources\views/tambons/form.blade.php ENDPATH**/ ?>