+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / How to turn 17 forms into 1, with a dynamic field based on breadcrumb?

How to turn 17 forms into 1, with a dynamic field based on breadcrumb?

2 posts, 0 answered
  1. Corby
    Corby avatar
    48 posts
    Registered:
    19 Sep 2011
    27 Sep 2012
    Link to this post
    Sitefinity 5.1.3450.0, on Azure (web and sql).

    I have 17 forms, one for each location.  The forms are all identical in terms of fields.  The only difference is the location the user fills out the form for.

    Name:
    Email:
    Phone:
    Comment:

    The same fields for all forms...but I want a "Location:" field that automatically populates the form based on the breadcrumb so one form can be used for all locations with the "Location:" spot automatically filled out.

    Name:
    Email:
    Phone:
    Comment: 
    Location:  *from breadcrumb* /locations/Kansas-City/

    Is this possible? 
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    28 Sep 2012
    Link to this post
    Totally :)
    1) Put on a new layout where you want the location to exist, edit it, and give it a wrapper class name
    2) Drop a textbox in there, call it location
    3) Use jquery to grab\form the location (get the url, or breadcrumb, or wherever)
    4) Place that jquery data into the location box.

    So when they submit, it goes into the DB as if they typed it.

    To make it "Hidden", just CSS the wrapper div class you made above into a display:none

    Done!
2 posts, 0 answered