Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter Sign In with OpenID Sign In with Google

Sign In Sign Up

In this Discussion

Tagged

Welcome to the Jo support forums! Please Sign Up and join in the discussion. You can also Sign In instantly with Twitter, OpenID or your Google ID.
Input tags for joInput
  • kevinwalzerkevinwalzer April 2012
    Posts: 63
    I'd like to add some iPhone/Safari/HTML5 tags to joInput, specifically the type, autocorrect, autocapitalize, and placeholder tags, something that looks like this in HTML:

    <input type="text" autocorrect="off" autocapitalize="off" placeholder="Some text here.">

    How can I add these tags to joInput? I don't see how in the API. 




  • kevinwalzerkevinwalzer April 2012
    Posts: 63

    I found a code snippet elsewhere in the forums that suggested how to do this. Here is what I came up with:


    joDomainInput = function(data) {
     joInput.apply(this, arguments);
    };
    joDomainInput.extend(joInput, {
      tagName: "input",
        type: "url", 
     createContainer: function() {
            var o = joDOM.create(this);
          
         if (!o)
              return;
      
         o.setAttribute("type", "url");
         o.setAttribute("autocorrect", "off");
         o.setAttribute("autocapitalize", "off");
         o.setAttribute("placeholder", "Enter domain name here.");
         o.contentEditable = this.enabled;
            
         return o;
        }
    });

  • davedave April 2012
    Posts: 415

    Nice!

    Dave Balmer, Jo Code Wrangler