form!
title "Search Telephone Numbers"

if @error
	instructions @error
else
	instructions(
		"You can search for a telephone number you like, for example by " \
		"an area code (like 810) or a state code (like MI)."
	)
end

field(
	var: "q",
	type: "text-single",
	label: "Search Telephone Numbers",
	description:
		"Enter one of: area code; zip or postal code; state or province code; " \
		"six or seven digit number prefix; city, state/province code; " \
		"or indicate a vanity pattern with ~"
)

action_options = [
	{ label: "Search", value: "next" },
	{ label: "Just Show Me Some Numbers", value: "feelinglucky" }
]
if @allow_data_only
	action_options << { label: "Just Data, Please", value: "data_only" }
end

field(
	label: "Action",
	type: "list-single",
	var: "http://jabber.org/protocol/commands#actions",
	options: action_options,
	value: "next"
)

xml.set(xmlns: "http://jabber.org/protocol/rsm")
