Support » Plugin: Login With Ajax » The use of widget several times and duplicated ids

  • Trebly

    (@trebly)


    Hi,

    The problem is the following.

    If a widget lwa is defined must the user define as many widget as he needs uses of the widget into his page ?

    If the user runs several do_widget of the same lwa widget the various fields and buttons will have the same name and ids which is invalid.

    Best regards

    Trebly

Viewing 1 replies (of 1 total)
  • Hi,

    I wrote the previous message a little quickly, and there are some complements here.
    There are several id duplicated if you use loginwithajax widget several times:

    • The id of the widget : “loginwithajaxwidget-(n)” (where “(n)” is the number associated uniquely with the widget – (doesn’t necessarily starts from 1 for a defined “post”). The solution is to not use several time shortcodes with the same lwa widget id.
    • The 3 ids : “lwa_wp-submit” ; “user_email” ; “user_login” of the form of class=”lwa-form” in any lwa widget which creates duplicated ids

    To be in conformity (see note) with html specifications the “name” identify the data to get query while fields ids must be unique. So the ids should be, as for loginwithajax main div “lwa_wp-submit-(n)”, “user_email-(n)” ; “user_login-(n)”

      Best regards

      Trebly

      note : these specification can be found for chromuim at :
      https://www.chromium.org/developers/design-documents/create-amazing-password-forms
      The text is :
      Follow HTML guidelines
      Web browsers are designed with the HTML specification in mind, and going against it can lead to unexpected issues with your web page. This means:

      Element id attributes should be unique: no two elements should have the same id.

Viewing 1 replies (of 1 total)
  • The topic ‘The use of widget several times and duplicated ids’ is closed to new replies.