5 Replies Latest reply: Nov 23, 2011 5:14 AM by Mike, UK RSS

    Change item input type for use with jQuery mobile

    Mike, UK
      Hi,
      I'm trying to change the input type of a text item, so that a mobile device can use the numeric keypad, date picker etc etc. jQuery mobile's method of doing this is e.g input type = "tel"

      I can create a field myself using this and works fine, but I can't see how to set this in Apex. I've got a basic Apex Form created on demo_customers, so each field is a text item, how do I set e.g the phone number field to item_type="tel" rather than item_type="text" which is how it's rendered at the moment?

      Thanks,

      Mike
        • 1. Re: Change item input type for use with jQuery mobile
          874041
          I am using a hosting company call imobileapp, i am trying to make the page the same size to fit on the mobile app I need help
          • 2. Re: Change item input type for use with jQuery mobile
            fac586
            Mike, UK wrote:

            I'm trying to change the input type of a text item, so that a mobile device can use the numeric keypad, date picker etc etc. jQuery mobile's method of doing this is e.g input type = "tel"

            I can create a field myself using this and works fine, but I can't see how to set this in Apex. I've got a basic Apex Form created on demo_customers, so each field is a text item, how do I set e.g the phone number field to item_type="tel" rather than item_type="text" which is how it's rendered at the moment?
            Out of the box current versions of APEX only provide the declarative Page Item types described in Appendix A of the Application Builder User's Guide, and dynamic generation of item types supported by the <tt>apex_item</tt> API.

            To include these new HTML5 input types you'll have to extend APEX by creating new item types using the plug-in architecture (or find some existing plug-ins that already implement them&mdash;search for "APEX item plug-ins").
            • 3. Re: Change item input type for use with jQuery mobile
              fac586
              871038 wrote:
              I am using a hosting company call imobileapp, i am trying to make the page the same size to fit on the mobile app I need help
              DO NOT post new questions as follow-ups to unrelated threads. This has nothing to do with the original question.

              Hijacking other threads is NOT an effective way of getting help:

              <li>Your assumption that the questions are related may be incorrect (as in this case), leading to confusion about the nature of the problem and potential solutions
              <li>You have no ability to mark posts as helpful or correct

              Post your question as a new thread, including at least the following information:

              <li>APEX version
              <li>DB version and edition
              <li>Web server architecture (EPG, OHS or APEX listener)
              <li>Browser(s) used
              <li>Links to related posts and threads using the methods in the FAQ.

              Please read the FAQ and forum sticky threads for more information on using this forum effectively.

              And update your forum profile with a real handle instead of "871038".
              • 4. Re: Change item input type for use with jQuery mobile
                Patrick Wolf-Oracle
                Hi Mike,

                Peter Raganitsch has already created an item type plug-in where you can specify the HTML5 type. See http://apex-plugin.com/oracle-apex-plugins/item-plugin/html5-input-item_107.html
                for details.

                Regards
                Patrick
                -----------
                My Blog: http://www.inside-oracle-apex.com
                APEX Plug-Ins: http://apex.oracle.com/plugins
                Twitter: http://www.twitter.com/patrickwolf
                • 5. Re: Change item input type for use with jQuery mobile
                  Mike, UK
                  Thanks Patrick, Peter pointed me to that and it works really nicely, easy to extend to other datatypes too.