How to make a form field float when the page is scrolled?

  • Profile Image
    snapry
    Asked on February 13, 2015 at 12:03 AM

    Hey Ben

    I'm trying to do this same thing. I see your form, and that is what I am after....but how do I set a particular field to 'float' the way your "total" field does. 

     

    Cheers

    James

  • Profile Image
    ashwin_d
    Answered on February 13, 2015 at 12:20 AM

    Hello James,

    Yes it is possible by injecting custom css code in your form. You need to find out the field id of the "total field and its label" and inject the following custom css code in form:

    #LABEL_ID{

    position: fixed;

    bottom: 30px;

    right: -14px;}

     

    #FIELD_ID {

    position: fixed;

    right:10px;

    bottom:20px;}

    You need to replace the "LABEL_ID" & "FIELD_ID" with your own form field id and also adjust the value of right/bottom to display the field in desired location.

    The following guide should help you on how to find field ID:  http://www.jotform.com/help/146-How-to-find-Field-IDs-Names 

    I did check your last edited form. Do you want to make your question "Total cost: all items (this will be calculated)" float? Please inject the following custom css code in your form:

    #label_289{

    bottom: 30px;

    position: fixed;

    right: -14px;}

     

    #input_289{

    position: fixed;

    right:10px;

    bottom:20px;}

    The following guide should help you on how to inject custom css code in form:  http://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes 

     

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image
    lafhab2
    Answered on June 12, 2015 at 06:23 AM

    This is great, but I have a question:

    How can I make a Text element float?  There is no element field ID to quote for inserted text/html.

    I am using pre-populate for a specific field, I wanted that to float but can't make it large enough, so I have used the text element and insert {fieldname} which is fine because I can use font size.  I now want to make that float but there is no field ID to use in the code above.
  • Profile Image
    Boris
    Answered on June 12, 2015 at 08:45 AM

    lafhab2, please note that we can only assist with one question per thread, so your question has been moved here:

    http://www.jotform.com/answers/587231

    We will be assisting you there shortly. Thank you.