Edit Employee Record

This page uses a Hashtag Form to edit records for Employees.   The form is styled using Bootstrap 3 default theme classes.   A Hashtag List is used to generate selectable options for the Employee's Office.   The ID of the selected Office is stored in the Employee record, and can be used to relate Employees to Offices.  


Processed this Hashtag Markup:
<# start list for offices;
	sort by name;
	save to office.options;
#>
<option value="<# id #>"><# name as html #> (<# country_iso_code as html #>)</option>
<# end list #>

<# start form for employees <#[url.edit]#>;
	set form.class to "form-horizontal";
	when done redirect to "/company/employees";
#>

<div class="form-group">
	<label for="name" class="col-sm-3 control-label">Employee Name</label>
	<div class="col-sm-5">
		<input type="text" <# Name #> required class="form-control" id="name">
	</div>
</div>
<div class="form-group">
	<label for="title" class="col-sm-3 control-label">Job Title</label>
	<div class="col-sm-5">
		<input type="text" <# Title #> required class="form-control" id="title">
	</div>
</div>
<div class="form-group">
	<label for="office" class="col-sm-3 control-label">Office</label>
	<div class="col-sm-5">
		<select <# Office ID #> class="form-control" id="office">
			<option value="">Choose an Office</option>
			<#[office.options]#>
		</select>
	</div>
</div>
<div class="form-group">
	<div class="col-sm-offset-3 col-sm-5">
		<input type="button" <# Create button #> class="btn btn-primary">
		<input type="button" <# Update button #> class="btn btn-primary">
		<input type="button" <# Delete button #> class="btn btn-primary">
	</div>
</div>

<# end form #>

The Company Mini-App uses the Hashtag Markup Language to maintain multiple sets of records that relate to each other.

Records for Employees, Offices, and Countries are stored in an SQL Database.   Methods are provided to create, update, and delete any record.