Tracked Value Form with Change Log
This page uses a Hashtag Form to create, update, or delete a Tracked Value.
Form Actions are used to log all changes, recording both the old and new values.
Processed this Hashtag Markup:
<# start form for tracked_values <#[url.edit]#>;
set form.class to "form-horizontal";
when creating
create new record for "tracked_values_changelog";
set tracked_value_id to "<# form.id #>";
set type to "Create";
set name to "Tracked";
set old to "";
set new to "<# form.tracked #>";
when updating and ("<# form.tracked #>"!="<# tracked #>")
create new record for "tracked_values_changelog";
set tracked_value_id to "<# form.id #>";
set type to "Update";
set name to "Tracked";
set old to "<# tracked #>";
set new to "<# form.tracked #>";
when deleting
create new record for "tracked_values_changelog";
set tracked_value_id to "<# form.id #>";
set type to "Delete";
set name to "Tracked";
set old to "<# tracked #>";
set new to "";
when done redirect to "/changelog/list?index=<# form.id #>";
#>
Tracked Value:<br>
<input type="text" <# Tracked #>><br>
<input type="button" <# Create button #>>
<input type="button" <# Update button #>>
<input type="button" <# Delete button #>>
<# end form #>