Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Change the <input type...> on a TextBox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Change the <input type...> on a TextBox

    Does anyone know if there is a way to change the <input html code for a TextBox control to <input type="number"?

    I am trying to force the iPad keyboard to display the correct keyboard layout for the field type, but I can't seem to figure it out.

    Thanks

    #2
    Re: Change the &lt;input type...&gt; on a TextBox

    Hi Michael,

    See attached screen shot, hope this helps.

    Check Client Side formatting. Then from Format type select Custom. Next select Format Definition. Click on that to open the dialog and select Number from the radio button. Finally, edit the Parse out with the format at the bottom of the dialog.
    Attached Files
    Last edited by Keith Hubert; 02-21-2012, 04:04 AM.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: Change the &lt;input type...&gt; on a TextBox

      Hi Kieth

      I did as you said, but when I look at the page source it still only reads:
      <input id="GRID1.V.R1....
      instead of
      <input type="number" id="GRID1...

      therefore the iPad still only displays the normal keyboard, not the numeric keyboard. Any other ideas? Thank you

      Comment


        #4
        Re: Change the &lt;input type...&gt; on a TextBox

        Anyone else have any ideas?

        Comment


          #5
          Re: Change the &lt;input type...&gt; on a TextBox

          You can set your control type to "custom" and write your own html for the control to get you this. The code below is pulled from a grid using Firebug with Firefox to show the input type change.
          Code:
          <input id="GRID1.V.R10.CUSTOMERID" class="GrTanEdit" type="number" size="5" maxlength="5" name="V.R10.CUSTOMERID" value=" 57">
          Not the easiest thing, but it does look doable.
          Jim Coltz
          Alpha Custom Database Solutions, LLC
          A5CustomSolutions.com
          [email protected]

          Comment


            #6
            Re: Change the &lt;input type...&gt; on a TextBox

            Jim - thanks. I had managed to add a field set to "custom" to a grid, and display the required data, but I couldn't get Alpha to let me submit the changed data back to the database. Also, I am using a Dialog2 which doesn't have the "custom" type.

            Comment


              #7
              Re: Change the &lt;input type...&gt; on a TextBox

              michaeldarby, did you figure out how to get this to work? I am trying to force the numeric keyboard on android phones and I am also trying to set the input type to <input type="number"

              Comment


                #8
                Re: Change the &lt;input type...&gt; on a TextBox

                I got it sorta working with a custom control type. It works in the working preview, internet explorer, and firefox but does not work in the chrome web browser. This must be something to do with HTML5 as IE does not support it yet and firefox does not support the input type yet. In chrome the text box is properly displayed but when a value is entered it does not submit it.

                Here is what I did... I copied the HTML code A5 generates when it creates a textbox for the desired field then I changed the field to a custom field and wrote xBasic which substitutes the data to replicate what A5 generates.

                Code:
                Order_qty_c_render = <<%html%
                <input id="!CNAME!.V.R!ROWNUM!.ORDER_QTY_C"  style=" " size="3" maxlength="3"  class="MobBlueEdit" type="number" name="V.R!ROWNUM!.ORDER_QTY_C" value="!VALUE!" />
                %html%
                
                Order_qty_c_render = STRITRAN(Order_qty_c_render,"!VALUE!", convert_type(data.ORDER_QTY_C,"C") )
                Order_qty_c_render = STRITRAN(Order_qty_c_render,"!ROWNUM!", convert_type(args.RowNumber,"C") )
                Order_qty_c_render = STRITRAN(Order_qty_c_render,"!CNAME!", args.GridDefinition.ComponentName )
                
                
                HTML it Generates:
                <td id="OGG.TD.R5.ORDER_QTY_C" class="MobBlueGridData"  ><input id="OGG.V.R5.ORDER_QTY_C"  style=" " size="3" maxlength="3"  class="MobBlueEdit" type="number" name="V.R5.ORDER_QTY_C" value="0" /></td>
                
                HTML of another textbox which is very similar to compare the generated code to:
                <td id="OGG.TD.R5.ORDER_QTY_B" class="MobBlueGridData"  ><input     id="OGG.V.R5.ORDER_QTY_B"  style=" " size="3" maxlength="3"  class="MobBlueEdit" type="text" name="V.R5.ORDER_QTY_B" value="0" /></td>
                Last edited by LukeS; 05-07-2012, 07:04 PM.

                Comment


                  #9
                  Re: Change the &lt;input type...&gt; on a TextBox

                  Hi Luke, I did ask Selwyn about it a while back and he said to use the OnGridPartRender server side event to replace part of the generated html for the relevant fields (By replacing values in e.html). It nearly worked in that the keyboard behaved properly on the iPad and Android phone, but every time I tried to submit the data, the data would get lost. The HTML looked perfect so I was a bit confused, but didn't have the time to keep trying.

                  It would be great to find a way that works ...

                  Comment


                    #10
                    Re: Change the &lt;input type...&gt; on a TextBox

                    Michael, Thanks for the reply. That is an interesting way to handle it with the OnGridPartRender event. I am seeing the same result, nothing happens when I submit the data (it is not saved) on a HTML5 browser. It works in bowers that do not support HTML5 and the <input type="number...> is a HTML5 syntax. So this means the HTML is not botched up as the data can still be submitted and properly updated. It is just HTML5 (webkit) browsers are not submitting the updated data for some reason when the type is of number.

                    To see this turn on Grid --> Update Settings --> Debugging --> Show Update Commands then make a change to a type "number" input textbox field and hit submit, a server side update is not fired. If you change any other field and hit submit you will see the server side code displayed for an update. So not sure what how to resolve this but it would be interesting to find out. It is a real pain constantly changing over the the numeric keyboard to enter data on mobile devices.

                    Comment


                      #11
                      Re: Change the &lt;input type...&gt; on a TextBox

                      After talking with alpha they added the HTML5 type to the latest build, modified the javascript to accept the changes, and it works great now! I am thrilled about this addition and wanted to give you guys a heads up on the new feature.

                      HTML5_type.PNG

                      Comment


                        #12
                        Re: Change the &lt;input type...&gt; on a TextBox

                        That is great news - thanks for passing it on.

                        Comment

                        Working...
                        X