Add an Arbitrary Number of Fields to a Form
Sometimes there is no way of knowing how many fields will be necessary for a form in FormFunction. RepeatingElement allows you to create a super-field that can contain several lines.
In[1]:=
CloudDeploy[
FormFunction[
"addresses" -> RepeatingElement["StreetAddress", {2, 5}],
GeoGraphics[
Append[GeoMarker /@ #addresses,
Style[Line[TravelDirections[#addresses]], Thick, Red]]] &,
AppearanceRules -> <|
"Title" -> "Get travel directions for your trip"|>]]
The form starts out with two fields; you can click the plus sign to get more.
Submit the form to see the map of your trip.