Using the Bureaucracy field type of Select makes your data alias redundant. Use the Data_aliastextbox field type instead.
In your Bureaucracy form change:-
select : "Location" "Please Choose|Location1|Location2"
to:-
Data_aliastextbox "Location" _somelocation
That will create a drop-down item in the Bureacracy form for "Location" - the only values the user can select from are "Location1" or "Location2" (pulled from the data alias you created).
The default will be the first alias (
Location1). If you don't like that add a new alias called "
Choose a location" (so the valid values for the alias becomes "
Choose a location, Location1, Location2") and add a regex to the Bureaucracy form "
/^(Location[12])$/" to force the user to select a valid Location value from the drop-down list.
Example
Type Alias = "
somelocation"
Valid Values = "
Choose a location, Location1, Location2"
Bureaucracy form = "
:test"
---- datatable ----
cols : %title%, something, location, reference, remarks_
headers: Page, Something, Location, Reference, Remarks
filter: type = test
----
<form>
Action template templates:testtpl "test:##Something##"
Textbox "Something" /^((?!<\/nowiki>).)*$/
Data_aliastextbox "Location" _somelocation /^(Location[12])$/
Textbox "Reference"
Textarea "Remarks"
Submit "Create a new record"
Thanks "[[test|Show updated tables]]"
</form>
NOTE: you may find that the table will not display data from pages you have not yet viewed. See next note for one way to make that easier.
Template = "
:templates:testtpl"
======@!PAGE@======
---- dataentry something ----
Type : test
something : @@something@@
Location_somelocation : @@Location@@
Reference : @@Reference@@
Remarks_ : @@Remarks|@@
----
[<>]
NOTE: the template adds an icon that allows browsing pages in that namespace. Browsing a newly created page will update the database in the page with the Bureaucracy form.