Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    654
    Plugin Contributions
    0

    Default Fixed header w/form 'required' attribute

    The template (non-ZC) I'm using has a fixed header on most pages. When submitting a form (create_account, contact_us etc) with a missing 'required' field the missing field scrolls right to the top - putting it underneath my fixed header.

    I'm try to identify what controls this scroll (so I can add in an offset), I thought it would be some ZC javascript but disabling javascript in my browser and the scroll still works. Is there another place in the ZC code I should be looking at or perhaps this is browser controlled - like the 'Please fill in this field' tooltip in Firefox.
    Last edited by simon1066; 11 Oct 2019 at 12:42 PM.
    Simon

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    654
    Plugin Contributions
    0

    Default Re: Fixed header w/form 'required' attribute

    WIth the help of Stackoverflow I see that I can control the scrolltotop with javascript although this puts the 'Please fill in this field' tooltip in the wrong place (still at the top) I suspect there's no way to control the tooltip's position so I might have to live with it.
    Simon

  3. #3
    Join Date
    Feb 2009
    Location
    UK
    Posts
    654
    Plugin Contributions
    0

    Default Re: Fixed header w/form 'required' attribute

    Quote Originally Posted by simon1066 View Post
    WIth the help of Stackoverflow I see that I can control the scrolltotop with javascript although this puts the 'Please fill in this field' tooltip in the wrong place (still at the top) I suspect there's no way to control the tooltip's position so I might have to live with it.
    Actually this works fine with Chrome. The problem in Firefox is the tooltip doesn't move with the input field - I gather this is a known issue. Another one of those browser-dependent things that may prove more trouble than it's worth. I'm not even going to look at Edge, IE, Safari etc.
    Simon

 

 

Similar Threads

  1. v150 Red asterisk on required attributes & issue with required attribute
    By ShopVille in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 13 Feb 2013, 03:18 AM
  2. Replies: 1
    Last Post: 19 Sep 2012, 04:11 AM
  3. Make a text attribute required ONLY IF another attribute is set
    By lars in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 23 Jun 2012, 08:58 PM
  4. product with fixed price and required purchase
    By mkinney in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 10 Jul 2011, 06:30 PM
  5. Marking required text attribute fields with an * or (required)?
    By fepb in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 3 Mar 2007, 07:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR