a simple form with the "submit" button: can it look better?

Hi all

I did not imagine that a simple form (with Textfields and ChoiceFields) could do a lot of problems:

I would like to ask a few basic questions about it. First the code (Simplified):

   GridFieldManager formfm;    

        EditField surname = new EditField("", "-", 25, Field.FIELD_LEFT | Field.FIELD_VCENTER | EditField.FILTER_DEFAULT);
    EditField email = new EditField("", "-", 25, Field.FIELD_LEFT | Field.FIELD_VCENTER | EditField.FILTER_EMAIL);

    public FormFieldManager(){

        formfm = new GridFieldManager(2,0);

        formfm.add(new LabelField("who: ", Field.FIELD_RIGHT | Field.FIELD_VCENTER));
        String[] choicewho = new String[] { "Mr", "Mrs", "Miss" };
        ObjectChoiceField who = new ObjectChoiceField("", choicewho, 0, Field.FIELD_LEFT |Field.FIELD_VCENTER);

        formfm.add(who);

    formfm.add(new LabelField("Surname :", Field.FIELD_RIGHT | Field.FIELD_VCENTER));
    formfm.add(surname);

    formfm.add(new LabelField("E-Mail :", Field.FIELD_RIGHT | Field.FIELD_VCENTER));
    formfm.add(email);

    ButtonField sendButton = new ButtonField("Send", Field.FIELD_HCENTER|ButtonField.CONSUME_CLICK);
    formfm.add(sendButton);
    FieldChangeListener listenerSendButton = new FieldChangeListener() {
    public void fieldChanged(Field field, int context) {

    try {
        String data = "send=true&surname=" +surname.getText();
        data += "&email=" + email.getText();      httpPost("http://bla/sendData.php", data);
    } catch (IOException e1) {
        e1.printStackTrace();
    }
    formfm.deleteAll();
    formfm.add(new LabelField("Grazie!"));
    }
  };
  sendButton.setChangeListener(listenerSendButton);

now my questions:

(1) don't miss something (style) for the EditFields? At the present time, it is possible to change them, but the behavior (9700 Simulator) is strange: it is 'difficult' to get from one field to the other and everything moves sometimes when editing...

How do you define a standard form that seems 'normal' and can be completed as expected in other applications? (Swifts nothing, it is possible to access the next field with the expected key / trackpad (I have no touch screen)) and so on?

The EditFields do not even have a border, but I guess that's the standard case on BlackBerry.

(2) the ObjectChoiceField is also very ugly... It's too big... Is it not possible to reduce the size without much effort? (I couldn't everride it correctly). (I also tried with radio buttons, but unfortunately I can't add a RadioButtonGroup to my LayoutManager, strange)

(3) it is perhaps a stupid question: I can't get the text selected from the ObjectChoiceField (to send it can in data).

AM EditField, it's simple:

editfield.getText()

But how is it with my ChoiceField?

I found getSelectedIndex() but it provides a value int not text...

Thanks in advance for any suggestions!

silizia

1. you have defined fields as follows:

EditField family name = new EditField ("vorname:", "-", 20, EditField.FILTER_DEFAULT);

The 20 means 20 characters, so it's all the field allows you to enter.

2. Yes, the mail filter is pretty useless.  Use the EmailAddressEditField instead

3. you can play with the scroll, but the best thing to do is to set the focus on the first field that you want people to pull together - usually the upper part of the form.

Tags: BlackBerry Developers

Similar Questions

  • 2 or more forms with "1 submit" button (Business Catalyst Forms)

    I am very new to Ajax and Java

    So I'll need a bit of hand holding on it.

    If it's too much to explain in a post on the forum, I'd be willing to pay someone to set up properly and to explain so that I can repeat on my own $50.

    But here's what I'm trying to do.

    Presentation of multiple forms with single submit button.

    I need to create many many forms, so rather than repeat the basics (details and company info)

    I would just be able to manufacture PARTS of form and then build forms much faster this way.

    The forms I created are for various applications.

    I use the personal and professional contacts as the first 2 examples, but I'm going ELSEWHERE, I also understand according to the form.

    So just keep in mind these are examples.

    The point is that each PARTY is a separate form.

    The reason clear to achieve is to save time, many similar applications that I need to do the construction.

    Example 1

    Form of home insurance

    SECTION A - personal information

    PART H - home (s) address

    PART F - personal fire and alarm information

    PART C - the previous insurance issues and cancellation insurance

    ----------------

    submit button: supports all 4 forms above

    Example 2

    The company insurance form

    SECTION A - personal information

    PART B – business contact information

    PART D - commercial address information (what to do if several addresses?)

    PART E - business and information fire alarm

    PART C - the previous insurance issues and cancellation insurance

    --------------------

    submit button: submit all 5 forms above

    So ideally, I would need the following requirements.

    1. present the single button

    2. present the code can handle 2 or more parts not the value # specific

    3. I would prefer if it was automated code (so I don't have to change the code every time, I can simply add the parts - and also long ID # or named it will work correctly)

    4. If there is a problem with any PART stop the entire form

    5-

    A question, I had barely know is how "combine" forms a single entity so that they can change it later if necessary?

    * as turn a case, or to award to each PARTY a hidden form variable link #.

    * This is probably best handled with a webapp, Yes?

    Thanks in advance for any help.

    It's all a bit above my level of understanding of right at this moment. So, if anyone can offer help or services.

    Please let me know. I have to get rolling on this ASAP.

    * main problems I have with BC forms:

    I did a lot of work with them recently, so I get a kick of the foibles, but there is always a ton of issues and roadblocks that I meet that requires a workaround solution.

    I wish I knew how to make dynamic British Colombia forms, because the BC is not a data source for multiple selection option, we must create a webapp connection to combine everything.

    Unless there is another way to combine multiple forms, I guess that's what about this discussion/issue together.

    So thank you once again.

    Are you ok with BC being unable to report on the data of the form? Rather than having the fields map to a client-server, you could serialize the form data (in JSON format, perhaps) and submit the entire form in a single field in a form BC, or an element of the Webapp.

    This would allow the form fields to be as dynamic as you can imagine. you will be not restricted to use only the form fields that have been declared in the admin.

    You have to take care around the diagram, because BC does not have an influence or support for that. It also means that when you want to display the data, you will need to go through your own deserializer. In addition, there are length limits to keep in mind.

  • PDF document with the "submit" button

    I created a PDF file with a "submit" button. Forms works perfectly when I use it on my mac. However, when I download the file to my website using MUSE, I can access it fine online, but the send feature will not work. I can fill it without any problem, it just will not submit. What Miss me?

    Thanks in advance.

    Presentation only works in Acrobat / Adobe Reader. It's a closed system. You cannot use the other PDF viewers as they are integrated into browsers.

    Mylenium

  • help required with the "submit" button

    Hello

    I need a little help with the button submit. The user submits the form as a PDf to a servelt using the "submit" button. The form is validated at the side server. If errors occur the error messages are to be displayed to the user as part of the form.

    My approach was to have a present in the form of hidden field. After you receive the error messages the field must be filled with these messages and real visible.

    Problem with my approach:

    (1) how to send back data on the ground using the code of the servlet that we have?

    Unless you use a Web service, sending data top of the Servlet form can is not possible.

    Once the form sends data to the Servlet, the connection will be lost between the form and the Servlet.

    But if you use a Web service, you can intercept the response and display it to the user.

    Another alternative to the approach of the Servlet is, view another page in the browser with the response.

    If the user then sends is notified the result in a new window.

    Thank you

    Srini

  • Is it possible to use a Post form with no submit button

    I have a site whose users log in.
    After logging in, they can click on a navigation button to access an application. Currently users must log in our site, and then in the application.
    We strive to eliminate the need for 2 connections by using pass-through authentication.
    I send a form post to the application w / user session data (user Id).
    I've been asked not to create a page where users hit send.
    So my question is what is the best way to do it?
    I was planning on creating another page that opens when the user clicks the Browse button. The page that opens looks as if it connecting to the application. This page would contain a w shape / form field hidden {session.userinfo} and post it to the application.
    So is there a way magic w / a redirect or something in that?
    Thanks for your help!

    Hi Tina,
    This depends a lot on the application that you want to access from your site CF.

    One way would be something server side, having the button browse your call of the page the script navigate.cfm on your server, that uses cfhttp to submit the connection to the application as recommended Ian. But the problem in this situation may be that the application will return a session on the CF Server (a cookie with a session for a 'connected' session ID), and I don't know if the CF server could "transfer" this session in the browser of the user.

    The other way would be to have a solution on the browser side. But in this case you would need to have the CF post server username and password in the source code of your page in the browser (user name and password would be clear! in the source code of the page).

    The simple solution for the option on the browser side would be to have the login form hidden not in a separate window, but directly in your page (so your button navigate is basically the button submit to your login screen of applications). In this way, you can avoid javascript.

    The solution more complicated for option-side browser which avoids also the clear username / password problem, would be to have a navigation button that calls a javascript function that retrieves the user name and password of the server by using an authenticated and then Web service saves the credentials to the application.

    The server-side option would work only, if your application does not return a session in a cookie ID, but can also handle the Sessionid as a URL parameter.

    So it really depends on what your application can handle (cfhttp may not work if the site is properly protected against cross-site scripting), and what level of 'hair-lifting-security', you are ready to accept.

    See you soon,.
    Fouad

  • Send an active PDF form with a Submit button? (Acrobat Pro XI.)

    I created a very large active form of PDF with hundreds of fields with text boxes, drop downs, checkboxes, radio buttons, and I think that the kitchen sink. But for the life of me I can't understand how to create a Submit button that will send the completed form to an email address that is configured to print whatever it hits.


    I have read so many things about it that I'm completely confused. I need a script, is there a method through menus to Acrobat, Miss me or I'm barking at the Moon? You'll know more I could even say any help just get me going in the right direction. Thank you!

    Simply add a button and it is the mouse up action to "Submit a form" and use a type mailto URL and specify the complete PDF file is sent. If she needs to work with version 11 player, she should also be enabled for the drive: file > save as other > Reader Extended PDF > activate tools more

    Note that emailing is unreliable by report to be submitted to a web server, and it is difficult to secure, which is relatively easy with a web server.

  • A form with several submit button

    Hello

    I have a very long form. What I would therefore like to add an additional submit button so that the user can only change the image if they want to.

    -is it possible to have more than one form on the page. If Yes, how can I determine which form is submitted isDefined ('form1'), isDefined ('form2') doesn't seem to work,

    -If there are two buttons in the form did you know which preses because both seem returns true when tested with isDefined)

    Thank you

    -is it possible to have more than one form on the page. If Yes, how do

    I determine what form is submitted isDefined ('form1').

    isDefined ('form2') doesn't seem to work,

    /quote

    Yes.

    If ' there are two buttons to the form how do I know who has been

    Preses as both seem to return true when tested with isDefined)

    /quote

    Give the buttons different name attributes. Check your action page

    with StructKeyExists (form, "name_of_first_button") and

    StructKeyExists (form, "name_of_second_button"), which one was pressed.

    Mack

  • Captivate 8 - create form with the actions buttons

    Hi all

    I have 8 Captivate and some questions:

    1 when you create a shape with the polygon and then add text, the text is at the top of the element and the positioning of text in properties selections are missing.  It takes away the ability to create your own form with text and the use of these buttons.  Anyone know if it's just a mistake of programmers or someone has chosen to not add it?  Workaround solutions?

    1. converting polygon to no button, no equity in the properties selection.  another error?

    2 created the button from the selections of form 8, Captivate, still no equity in the properties selection.

    What is the point of a button that cannot perform an action?  Any workaround?

    Thanks for any help

    Using Captivate 8.0.0.145

    My apologies if the screenshots different because I'm in Expert mode and you may be in mode starting. Screenshots of one of my custom shape buttons here. He used a style custom with 3 States that I created at the OSM.

    Positioning of text:

    Button shape: visible only when you check the box 'Use as button' Actions

  • How can I tell where a .swf file is linking in with the submit button?

    Recently, I was hired as a graphic designer and administrator of the site to a local company. Now, everything was working fine until my employer has changed some settings with our FTP. All our "Customizer" on our Web site - which are .swf files - is more work.


    What I discovered is this: when a customer clicks on the button 'submit', the 'page' are they sent to? The information they type in what are to be sent to an e-mail address, but I can't find any of these settings in the .fla files on our server of the company.

    Once I know where they establish between, I can change this path or make sure that the path exists as it appears in the settings of these customizer .swf files.

    Any help that anyone can provide would be much appreciated! I don't have much experience with this program, or flash in general, but I understand the basics. I've spent most of my work day (8 hours) full trying to understand this point, and the end of my Friday draws to a close, I hope I don't spend another week to try to resolve this - a week where customers can customize their products on our website!

    Open the problem page in your web browser and press F12 to bring up the developer tools. Select the network tab (this is for Firefox or IE; in IE you need to click the green arrow to enable logging). When you click on send, it should display the address that the SWF file attempts to access.

  • Problem of forms via the "submit" button

    I am distributing a PDF via Microsoft Outlook and then compile the answers on my local server.  However, when participants click on 'submit', there is an error in the script that causes Outlook give me this message:

    Doc2.jpg

    Any help is very appreciated!

    J. Klaybor

    Hello

    No problem. Just open the Script Editor in the designer of the LC (if not already open). Window menu or F5.

    Drag to the bottom of the window (if it's only to show a single line), so that you can see several lines.

    Should be good to go! You can then the script against different manifestations, etc.

    Niall

  • A date today can be added in a date field when you press the submit button?

    I created a form with a "submit" button and the form is sent by e-mail.  Then the date when the form is submitted to appear in a date with the key field is pressed?


    Any help with this is appreciated. Thank you.

    Hello

    There is a preSubmit event to form objects that you can use.

    Select your date field, open the script editor and add this script (language is FormCalc) in the preSubmit event.

    $ num2date = (date (), ' MM/DD/YYYY')

  • Form the "submit" button similar to the first Page

    I'm trying to understand how the Send button.

    I'm moving on from my days of Frontpage.  There, I created a form with a button send at the bottom. I could right click on the button submit, where I've isolated a .txt file to a folder on the server called "_private".  The Send button would only add the info from the completed form at the bottom of the text file, which, being in the _private folder, could not access by password.

    All tutorials Dreamweaver I can find show how to make the shape (which seems simple enough), but none explain how to set up the submit button (which I do not want sent by e-mail) or where the info is presented or stored or accessible.

    Any help would be greatly appreciated!

    Kevin Gerow

    How forms work in a few words:

    (1) html forms collect data.

    (2) sometimes the client script (JavaScript/jQuery) are used to validate the form fields & make sure that all required fields are filled correctly.   It is not 100% reliable, however, that spammers robots do not use JavaScript.

    (3) PHP or another script server-side more guarantees the required fields are filled in (in the case of that JavaScript is disabled) and data are sanitized to prevent the pirates & spam bots to exploit your forms.  Then, data are processed by your server and sent to a destination specified in the script - that is to say, your e-mail address or folder / database on your server.   Finally, the user receives a success message telling them that the form was sent.

    For the end user, this seems very simple - as well it should.  But there are a lot of things behind the scenes.  If your server supports PHP & the function mail (), I wrote a tutorial part 3 contact form below.

    ALT-Web Design & Publishing: sensitive Contact form with 3.2 Bootstrap and PHP (part 1)

    Nancy O.

  • Problems after clicking on the Submit button in a form

    Hello people I'm new to the Forum. I have an IMac with OS Snow Leopard 10.6.4. I just finished my first Web site using dreamweaver CS4 and there style with CSS. I have also built a simple form using the tools 'Spry validation form' with a name and e-mail along with a "submit" button text boxes. When I saw my site in Safari and Firefox, and fill in the details with my own name and email address then click on the button submit, my e-mail "New Message" window opens. What should appear?  shouldn't I have a message "form sent.

    If a user entered text fields with coordinates and then clicks the Submit button should not he see also message 'Send form', not his new e-mail window.

    As I have not downloaded the site and yet I thought I would fix the code. I'm not sure as to the time code is incomplete.

    My another brief question is, is it wise to get an overview of the sites in browsers other than Safari and Firefox

    I'd appreciate any help offered.

    concerning
    John

    < form action = "mailto: " [email protected] "method ="get"name ="frmRegistration"target ="_blank"class ="blueCaptions"id ="frmRegistration"> "

    < span id = "sprytextfield1" >

    < label form 'name' = > name < / label >

    < br / >

    < input name = "name" type = "text" id = "name" tabindex = "10" size = "36" maxlength = "36" / >

    < br / >

    < span class = "textfieldRequiredMsg" > name required. </span > < / span >

    < p > < span id = "sprytextfield2" >

    E-mail < label for = "email" > < / label >

    < br / >

    "< input type ="text"name ="email"id ="email"tabindex ="20"size = 36.

    "maxlength ="36"/ >"

    < br / >

    < span class = "textfieldRequiredMsg" > a valid email address is required. </span > < span class = "textfieldInvalidFormatMsg" > incorrect e-mail. </span > < / span > < / p >

    < p >

    < input type = "submit" name = "submit" id = "submit" value = "Submit" tabindex = "30" / >

    < /p >

    < / make >

    This is what happens when you use mailto Action of forms. It is not completely reliable and should be avoided. To send the form, you need a form mail script on the server side. First check if your host can provide a suitable to your hosting plan. If this is not the case, check back for some suggestions.

    Also, be careful when posting in these forums. You have submitted 4 duplicate threads.

  • How to create a form with a submit in CC button animate using Actionscript 3

    How to create a form with a submit in CC button animate using Actionscript 3. The file will first be a SWF but will also have the flexibility to export as HTML5

    I've searched high and low for an example of code for this entry.

    Can someone help me please?

    Thank you

    You can use the same graphic assets of basis for two projects, but the coding will be different for everyone.  You must work on the project of a code at a time.

  • How can I configure my computer to the simple click with the mouse to double-click to open an item on the desktop instead

    How can I configure my computer to the simple click with the mouse to double-click to open an item on the desktop instead

    Hi placebow,

    Open the Options folder by clicking the Start button, clicking Control Panel, appearance and personalization, and then clicking Folder Options. On the general tab, click single-click to open an item. (To return to the standard click, click double-click to open an item.)

    The setting applies not only at the office, but also in other areas of the shell.
    Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience]

Maybe you are looking for