List&CheckBoxes

Hi, I have a JInternalFrame and I want to display a list of objects (eg. Member) and a checkbox next to them. Members are drawn dinamically from db. The format must be something like this:
member.toString() <checkbox>
member.toString() <checkbox>
member.toString() <checkbox>
member.toString() <checkbox>
etc..
JList does not allow me to include ckeckboxes. And if I assign member.toString() as Text for a JLabel, how can I assure that data will be aligned in different lines/rows? What kind of structure should I use to implement tthis?
Thanks!

Try for a BoxLayout with 2 colums.
Each column contains a GridLayout with identical number of cells vertically and a single cell horizontally.

Similar Messages

  • Select List - checkbox not working properly

    Hi,
    Can anyone help? I'm able to insert one record into the table with the code listed below, if I select only one checkbox. I get this error message, if I select more than one checkbox: ORA-01722: invalid number ORA-02063: Error ERR-1003 Error executing computation query . Note - Employee number is numeric in table. This is my select list/checkbox field being used in application. Thanks.... Elaine
    Procedure being used is:
    create or replace procedure "SAF_INSERT_MEETING_RECORDS"(
    EMPNUMBER_in IN SAF_MEETING_INFO_V.EMPNUMBER%TYPE,
    COURSEID_in IN SAF_MEETING_INFO_V.COURSEID%TYPE,
    TRAINDATE_in IN SAF_MEETING_INFO_V.TRAINDATE%TYPE,
    HOURSTRAINED_in IN SAF_MEETING_INFO_V.HOURSTRAINED%TYPE,
    NEXTTRAINDATE_in IN SAF_MEETING_INFO_V.NEXTTRAINDATE%TYPE,
    DATEADDED_in IN SAF_MEETING_INFO_V.DATEADDED%TYPE,
    ADDEDBY_in IN SAF_MEETING_INFO_V.ADDEDBY%TYPE,
    DATEMODIFIED_in IN SAF_MEETING_INFO_V.DATEMODIFIED%TYPE,
    MODIFIEDBY_in IN SAF_MEETING_INFO_V.MODIFIEDBY%TYPE,
    CURDEPT_in IN SAF_MEETING_INFO_V.CURDEPT%TYPE,
    CURDEPTDESC_in IN SAF_MEETING_INFO_V.CURDEPTDESC%TYPE,
    SEQNUM_in IN SAF_MEETING_INFO_V.SEQ_NUM%TYPE)
    is
    myHoursTrained NUMBER;
    mySeq NUMBER;
    vCHECKBOXES APEX_APPLICATION_GLOBAL.VC_ARR2;
    BEGIN
    vCHECKBOXES := APEX_UTIL.STRING_TO_TABLE(EMPNUMBER_in);
    myHoursTrained := TO_NUMBER(HOURSTRAINED_in);
    FOR i IN 1..vCHECKBOXES.COUNT
    LOOP
    BEGIN
    SELECT SAF_MEETING_SEQ.nextval
    INTO mySeq
    FROM dual;
    END;
    INSERT INTO SAF_MEETING_INFO_V
    (EMPNUMBER,COURSEID,TRAINDATE,HOURSTRAINED,NEXTTRAINDATE,DATEADDED, ADDEDBY,DATEMODIFIED,MODIFIEDBY,CURDEPT,CURDEPTDESC,SEQ_NUM)
    VALUES
    (vCHECKBOXES(i) , COURSEID_in, TRAINDATE_in, myHoursTrained, NEXTTRAINDATE_in, SYSDATE,
    ADDEDBY_in, DATEADDED_in, MODIFIEDBY_in, CURDEPT_in, CURDEPTDESC_in, mySeq);
    END LOOP;
    END;

    varad,
    Thank you so much for your response. I had a few issues with numeric vs character data that I needed to address. I was able to resolve them all, based on the information you provided. I'm posting my new working code. Thanks again. Elaine
    Working code is:
    CREATE OR REPLACE procedure "SAF_INSERT_MEETING_RECORDS"(
    EMPNUMBER_in IN VARCHAR2,
    COURSEID_in IN SAF_MEETING_INFO_V.COURSEID%TYPE,
    TRAINDATE_in IN SAF_MEETING_INFO_V.TRAINDATE%TYPE,
    HOURSTRAINED_in SAF_MEETING_INFO_V.HOURSTRAINED%TYPE,
    NEXTTRAINDATE_in SAF_MEETING_INFO_V.NEXTTRAINDATE%TYPE,
    DATEADDED_in IN SAF_MEETING_INFO_V.DATEADDED%TYPE,
    ADDEDBY_in IN SAF_MEETING_INFO_V.ADDEDBY%TYPE,
    DATEMODIFIED_in IN SAF_MEETING_INFO_V.DATEMODIFIED%TYPE,
    MODIFIEDBY_in IN SAF_MEETING_INFO_V.MODIFIEDBY%TYPE,
    CURDEPT_in IN SAF_MEETING_INFO_V.CURDEPT%TYPE,
    CURDEPTDESC_in IN SAF_MEETING_INFO_V.CURDEPTDESC%TYPE,
    SEQNUM_in IN SAF_MEETING_INFO_V.SEQ_NUM%TYPE
    is
    mySeq NUMBER;
    vCHECKBOXES APEX_APPLICATION_GLOBAL.VC_ARR2;
    BEGIN
    vCHECKBOXES := APEX_UTIL.STRING_TO_TABLE(EMPNUMBER_in);
    FOR i IN 1..vCHECKBOXES.COUNT
    LOOP
    BEGIN
    SELECT SAF_MEETING_SEQ.nextval
    INTO mySeq
    FROM dual;
    END;
    INSERT INTO SAF_MEETING_INFO_V
    (EMPNUMBER,COURSEID,TRAINDATE,HOURSTRAINED,
    NEXTTRAINDATE,DATEADDED,
    ADDEDBY,DATEMODIFIED,MODIFIEDBY,CURDEPT,CURDEPTDESC,SEQ_NUM)
    VALUES
    (to_number(vCHECKBOXES(i)), COURSEID_in, TRAINDATE_in, HOURSTRAINED_in,
    NEXTTRAINDATE_in, DATEADDED_in,
    ADDEDBY_in, DATEMODIFIED_in, MODIFIEDBY_in, CURDEPT_in, CURDEPTDESC_in, mySeq);
    END LOOP;
    END;
    /

  • Need help formatting List (checkbox list) web app items on a page.

    See this page: Joseph Cancilla
    As you can see from the above example the List (checkbox list) items are all running together. I can't figure out a way to separate the items.
    i.e. DANCE: Ballet,Ballroom should read DANCE: Ballet, Ballroom with a space after the comma.
    Seems like a simple problem but having a hard time finding a solution. Any help would be appreciated.
    Thanks!

    Hi Matt, You should read about web apps here:
    http://helpx.adobe.com/content/help/en/business-catalyst/partner/web-apps-module-create-cu stom.html
    And module reference here:
    http://helpx.adobe.com/business-catalyst/kb/modules-quick-reference.html
    If you insert through the admin and click customise you will see the option to use listbackup. You will also see that layout availible via FTP and in the admin or DW.
    Here you can see where in the module paramaters the option to choose listbackup occurs:
    http://helpx.adobe.com/business-catalyst/kb/modules-quick-reference.html#id_65138

  • Webform - List (Checkbox) Not accepting variables

    I am having problems with a List (Checkbox) element on a webform where it will not save the text for the options that is entered. I enter the text i want and then save it and it shows with nothing. If it does save it properly and I go to edit or add any options it deletes everything.
    Please investigate and advise.
    Rob

    Hi Rob,
    If making a change to the form you'll need to first apply it within the admin via site manager -> web forms. 
    In this case add the text for the checkbox then save.  Go to the page with the form insert and replace with a fresh copy. 
    If still stuck please provide the form's url and the text information you want to add so we can assist further.
    Cheers!
    -Sidney

  • Manager can update membership list checkbox delegation

    Hi all,
    How can I delegate some users to check / uncheck the checkbox "Manager can update membership list" under the "Managed By" tab of group.
    I was found the way to grant them the delegation to change the "Managed By" user, but when they click OK after checking the checkbox "Manager can update membership list" they received the error message: "an error was encountered
    when trying to set the correct security settings for this manager to manage this object".
    Thanks all.
    Best regards,
    Oren Sharon

    Hi Oren,
    Based on my tests, we need to grant the user “Modify permissions” on the distribution group, then it can check/uncheck the “Manager can update membership list” checkbox.
    More information for you:
    Delegate rights to change "Managed By" tab
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/4a017dfc-d6e6-4255-9b81-43b1f4b40bc6/delegate-rights-to-change-managed-by-tab?forum=winserverDS
    Best Regards,
    Amy Wang

  • Accessing S:List Checkbox Item Renderer Outside the Renderer

    Hi All,
    I have an S:List, with a checkbox item renderer.  I was to be able to access the selected portion of the renderer to create a new function that at the press of a button this will delect all the current selected items in the list.
    Doco states that i should be able to do this just by setting the selectedIndex to -1.  But not sure if this is specific to 4.5??  But it is not working for me.
    Below is my current list.  Outside of this list flashbuilder does not know about chkList, or even selected.  How can i get access to this to deslect all?
    <s:List
    id="ltattributes">
    <s:itemRenderer>
    <fx:Component>
    <s:ItemRenderer>
    <fx:Script>
    <![CDATA[
    import mx.events.ItemClickEvent;
    protected function chkList_changeHandler(event:Event):void
    var e:ItemClickEvent = new ItemClickEvent(ItemClickEvent.ITEM_CLICK, true);
    data.selected = event.currentTarget.selected;
    e.item = data;
    e.index = itemIndex;
    dispatchEvent(e);
    ]]>
    </fx:Script>
    <s:CheckBox id="chkList" selected="false" label="{data.displayname}" change="chkList_changeHandler(event)"/>
    </s:ItemRenderer>
    </fx:Component>
    </s:itemRenderer>
    Thanks

    Try: dataGroup.getElementAt(). 
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • REUSE_ALV_LIST_DISPLAY append list checkboxes

    Hi,
    I am using REUSE_ALV_LIST_DISPLAY to display two lists after one another:
         PERFORM append_event   USING    slis_ev_end_of_list
                                         'LIST_2'
                                CHANGING lt_alv_event.
       CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
           i_callback_program             = gv_repid
           i_callback_pf_status_set       = co_cb_pf_status
           i_callback_user_command        = co_cb_user_command
           is_layout                      = ls_layout
           it_fieldcat                    = lt_fieldcat
           i_default                      = gv_variant_default
           i_save                         = 'A'
           is_variant                     = gs_variant_list1
           it_events                      = lt_alv_event
         TABLES
           t_outtab                       = gt_outtab_1
          EXCEPTIONS
            program_error                  = 1
            OTHERS                         = 2
    FORM list_2.                                        "#EC CALLED
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
           i_callback_program             = gv_repid
            i_callback_pf_status_set       = co_cb_pf_status
            i_callback_user_command        = co_cb_user_command
           is_layout                      = ls_layout
           it_fieldcat                    = lt_fieldcat
           i_default                      = gv_variant_default
           i_save                         = 'A'
           is_variant                     = gs_variant_list2
         TABLES
           t_outtab                       = gt_outtab_2
          EXCEPTIONS
            program_error                  = 1
            OTHERS                         = 2
    ENDFORM.                    " list_2
    The lists have the same structure. I have to add selection to BOTH lists. I tried ls_layout-box_fieldname = 'SEL' in both lists, then use SEL and SEL2 different box_fieldname, then tried to use the field catalog and set as CHECKBOX=X EDIT=X INPUT=X, but the checkbox values are reflected only for the first list internal table, not the second. As if the first list USER_COMMAND runs only and it does not se the second list internal table values.
    Is it possible at all?
    Thanks!

    Can you not use Block ALV  - REUSE_ALV_BLOCK_LIST_APPEND?
    Rgds,
    Juwin

  • Dynamic List Checkboxes

    Hi, I recently created a dynamic form with several check boxes. I've selected the 1,0 type and I was wondering if there was a way to easily change the second value in the pair. In this case the 0. So if the box is unchecked it puts a 2 or 9, just as an example. I looked through the code and I couldn't find where the value is set. I found this line in the page
    $ins_survey08->addColumn("OV_V", "CHECK BOX_1_0_TYPE", "POST", "OV_V", "0"); and thought that changing the last 0 would do it but it had no effect.
    Any ideas?
    Thanks

    Hi I am not 100% but here goes,
    1 = 2
    0 = 9
    $ins_survey08->addColumn("OV_V", "CHECK BOX_1_0_TYPE", "POST", "OV_V", "0");
    $ins_survey08->addColumn("OV_V", "CHECK BOX_2_9_TYPE", "POST", "OV_V", "9");
    This should look at the insert digs and input the select values as requested.
    "0"); / "9"); assumptions is that this is the default val if they have not selected anything and submitted the survey anyway.
    e.g. Answering "great / 10/10" to everything when they want to answer "Yes / No / Liked / Disliked"
    Cheers,
    Joe

  • Trying to remove a checkBox from a list of checkBoxes

    Hello,
    I have a dictionary that has TKey equal to a Decimal and with TValue equal to a List<CheckBox>. I declare it like so:
    Dictionary<Decimal, List<CheckBox>> entireCheckBoxList = new Dictionary<Decimal, List<CheckBox>>();
    The reason for doing this is that I can pass it a NumericUpDown value (which only is in Decimal), then I can find any created CheckBox's that corespond to the NumericUpDown value. So let say I have my NumericUpDown equal to 1, when I click on the up
    arrow, I pop-up a new form window that lets me enter data lets say folder name and file name. Then, when I click my save button, I create check boxes for a folder name and under that check box is a the file name but it is slightly indented to the right and
    under it:
    So the reason why I have a Decimal TKey is that when i pop up a new form to create checkBoxes, I can create as many check boxes as I want and only want to assign them to one number. So if I create 4 check Boxes in one form pop-up form, then I want the numberUpDown
    value to only be increased by one when I save it and create them. 
    So my main question is, when I click down on the numericUpDown arrow, I want to remove the index associated with the numericUpdown from both the control and this dictionary. I am able to remove from the dictionary like so:
    entireCheckBoxList.Remove(numbericUpDownValue);
    However now I want to remove from the control with something like this:
    this.tabPage1.Controls.Remove(entireCheckBoxList[numbericUpDownValue]);
    But I am receiving the following errors:
    Error 1
    The best overloaded method match for 'System.Windows.Forms.Control.ControlCollection.Remove(System.Windows.Forms.Control)' has some invalid arguments
    Error 2
    Argument 1: cannot convert from 'System.Collections.Generic.List<System.Windows.Forms.CheckBox>' to 'System.Windows.Forms.Control'.
    All I want to do is remove the check boxes associated with the numericUpDown value from the control that correspond to the ones created and stored in my dictionary List<CheckBoxes>. I am just not sure how to do it.
    Kind Regards.

    Ok great thanks for this. 
    I have just realized that if I can just remove the last item in the entireCheckBoxList dictionary added, then there is no reason for the numbericUpDownValue look up. I just need to remove the last item in this dictionary.
    I have tried many things to get the last item in the dictionary but are all out of ideas.
    Any clue?
    I have done this:
    var test = entireCheckBoxList.Last();
    then since this gives me the last value, I have then looped through like so:
    foreach (CheckBox item in test.Value)
    Then to remove only the last items created, since they are done in pairs, i have done this:
    count++;
    if ((count == test.Value.Count - 1) || (count == test.Value.Count))
    this.tabPage1.Controls.Remove(item);
    else
    if (!yourlist.Contains(item))
    yourlist.Add(item);
    entireCheckBoxList.Add(count, yourlist);
    where count is an int declare above. So the final solution is this:
    var test = entireCheckBoxList.Last();
    int entireCheckBoxCount = entireCheckBoxList.Count;
    List<CheckBox> yourlist = new List<CheckBox>();
    int count = 0;
    entireCheckBoxList.Clear();
    foreach (CheckBox item in test.Value)
    count++;
    if ((count == test.Value.Count - 1) || (count == test.Value.Count))
    this.tabPage1.Controls.Remove(item);
    else
    if (!yourlist.Contains(item))
    yourlist.Add(item);
    entireCheckBoxList.Add(count, yourlist);
    What do you think?
    Kind Regards.

  • Contact form-checkbox PHP coding doesnt work

    I am a beginner to web page design so i would be grateful if you can explain to me what PHP coding i would need for 'Checkbox' and where to place it in the PHP coding below. I can submit the form to my email with all the headings and the filled in forms with checkbox Yes or No.
    Only problem i have is that part of the check box info appear right at the top of the email message rather than the 'Name', 'Tel', 'Email' etc..Another half of the checkbox appear where it suppose to be wih double heading as shown below. I would also like to remove the <br> from the email message. Can you also tell me how to change the colour for heading so its clear.
    I have marked the checkbox code in BLUE for both HTML and PHP coding below. Sorry for the long coding. Look forward to hearing from someone. Much appreciated.
    Message delivered to the email address as received:
    Rear ground extension: Yes
    Two-storey rear extension: Yes
    Two-storey side extension: No
    Loft: Yes
    New Build: Yes
    Other: Yes
    Name: Test<br>
    Email: [email protected]<br>
    Contact No: 87576as<br>
    Address1: addy1<br>
    Address2: addy2<br>
    Town: town<br>
    County: county<br>
    Postcode: post<br>
    Property Type: Cottage<br>
    Property Area: None<br>
    Message:<br>
    test msg
    My HTML coding for the form:
    <div class="contactForm">
          <form id="form1" name="form1" method="post" action="test2.php">
            <fieldset>
              <legend><strong>Personal Information</strong></legend>
              <table width="690" border="0">
                <tr>
                  <td width="340"><p>
                <label for="name" class="contactLable">Name:</label>
                <input name="name" type="text" id="name" tabindex="10" size="30" />
              </p></td>
                  <td width="340"><p>
                <label for="contact_number" class="contactLable">Contact No:</label>
                <input name="contact_number" type="text" id="contact_number" tabindex="20" size="30" />
              </p></td>
                </tr>
              </table>
              <table width="690" border="0">
                <tr>
                  <td><p>
                <span id="sprytextfield1">
                <label for="email" class="contactLable">Email:</label>
                <input name="email" type="text" id="email" tabindex="30" size="30" />
              <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> </p></td>
                </tr>
              </table>
            </fieldset>
            <fieldset>
              <legend><strong>Project Information</strong></legend>
              <p><table width="690" border="0">
      <tr>
        <td width="340"><p>
                <label for="address1" class="contactLable">Address 1:</label>
                <input name="address1" type="text" id="address1" tabindex="40" size="30" />
              </p></td>
        <td width="340"> <p>
                <label for="address2" class="contactLable">Address 2:</label>
                <input name="address2" type="text" id="address2" tabindex="50" size="30" />
              </p></td>
      </tr>
      <tr>
        <td><p>
                <label for="town" class="contactLable">Town:</label>
                <input name="town" type="text" id="town" tabindex="60" size="30" />
              </p></td>
        <td><p>
                <label for="county" class="contactLable">County:</label>
                <input name="county" type="text" id="county" tabindex="70" size="30" />
              </p></td>
      </tr>
      <tr>
        <td><p>
                <label for="postcode" class="contactLable">Post Code:</label>
                <input name="postcode" type="text" id="postcode" tabindex="80" size="10" />
              </p></td>
        <td> </td>
      </tr>
      <tr>
        <td><p>
                <label for="propertyType" class="contactLable">Property Type:</label>
                <select name="propertyType" id="propertyType" tabindex="90">
                  <option>Please select</option>
                  <option>Detached</option>
                  <option>Semi-Detached</option>
                  <option>End of Terrace</option>
                  <option>Mid-Terrace</option>
                  <option>Flat</option>
                  <option>Bungalow</option>
                  <option>Cottage</option>
                  <option>Other</option>
                </select>
              </p></td>
        <td><p>
                <label for="propertyArea" class="contactLable">Property Area:</label>
                <select name="propertyArea" id="propertyArea" tabindex="100">
                  <option>Please select</option>
                  <option>None</option>
                  <option>Listed Building</option>
                  <option>Conservation Area</option>
                </select>
              </p></td>
      </tr>
    </table>
    </p>
           </fieldset><fieldset><legend><strong>Project Type</strong></legend>
              <table width="690">
                <tr>
                  <td width="338"><label>
                    <input name="rearExt" type="checkbox" class="contactCheckbox" id="CheckboxGroup1_0" tabindex="110" value="rearExt"/>
                  Rear ground extension</label></td>
                  <td width="340"><input name="sideExt" type="checkbox" class="contactCheckbox" id="CheckboxGroup1_1" tabindex="120" value="sideExt"/>
    Side ground extension</td>
                </tr>
                <tr>
                  <td><input name="twoStoreyRear" type="checkbox" class="contactCheckbox" id="twoStoreyRear" tabindex="130" value="twoStoreyRear"/>
    Two-storey rear extension</td>
                  <td><input name="twoStoreySide" type="checkbox" class="contactCheckbox" id="twoStoreySide" tabindex="140" value="twoStoreySide"/>
    Two-storey side extension</td>
                </tr>
                <tr>
                  <td><input name="loft" type="checkbox" class="contactCheckbox" id="loft" tabindex="150" value="loft"/>
    Loft conversion </td>
                  <td><input name="newBuild" type="checkbox" class="contactCheckbox" id="newBuild" tabindex="160" value="newBuild"/>
    New build </td>
                </tr>
                <tr>
                  <td><input name="flat" type="checkbox" class="contactCheckbox" id="flat" tabindex="170" value="flat"/>
    Flat conversion</td>
                  <td><input name="other" type="checkbox" class="contactCheckbox" id="other" tabindex="180" value="other"/>
    Other conversion</td>
                </tr>
              </table>
            </fieldset>
            <fieldset><legend><strong>Message</strong></legend>
              <p>
                <label for="message" class="contactLable">Your Message or Comments:</label>
                <textarea name="message" id="message" cols="45" rows="5" tabindex="190"></textarea>
              </p>
            </fieldset>
            <br />
            <input type="submit" name="Sumbit" id="Sumbit" value="Submit" tabindex="200" />
          </form>
        </div>
    PHP Coding to send to my email:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
    <title>Email Form</title>
    </head>
    <body>
    <?php
      $name=addslashes($_POST['name']);
      $contact_number=addslashes($_POST['contact_number']);
      $email=addslashes($_POST['email']);
      $address1=addslashes($_POST['address1']);
      $address2=addslashes($_POST['address2']);
      $town=addslashes($_POST['town']);
      $county=addslashes($_POST['county']);
      $postcode=addslashes($_POST['postcode']);
      $propertyType=addslashes($_POST['propertyType']);
      $propertyArea=addslashes($_POST['propertyArea']);
      $rearExt=($_POST['rearExt'])?"Rear ground extension: Yes":"Rear ground extension: No";
      $sideExt=($_POST['sideExt'])?"Side ground extension: Yes":"Side ground extension: No";
      $twoStoreyRear=($_POST['twoStoreyRear'])?"Two-storey rear extension: Yes":"Two-storey rear extension: No";
      $twoStoreySide=($_POST['twoStoreySide'])?"Two-storey side extension: Yes":"Two-storey side extension: No";
      $loft=($_POST['loft'])?"Loft: Yes":"Loft: No";
      $newBuild=($_POST['newBuild'])?"New Build: Yes":"New Build: No";
      $flat=($_POST['flat'])?"Flat: Yes":"Flat: No";
      $other=($_POST['other'])?"Other: Yes":"Other: No";
      $msg.="\n$rearExt\n$wsideExt\n$twoStoreyRear\n$twoStoreySide\n$loft\n$newBuild\n$wflat\n$ other";
      $message=addslashes($_POST['message']);
    // you can specify which email you want your contact form to be emailed to here
      $toemail = "[email protected]";
      $subject = "From Website Test";
      $headers = "MIME-Version: 1.0\n"
                ."From: \"".$name."\" <".$email.">\n"
                ."Content-type: text/html; charset=iso-8859-1\n";
      $body = "Name: ".$name."<br>\n"
                ."Email: ".$email."<br>\n"
                ."Contact No: ".$contact_number."<br>\n"
                ."Address1: ".$address1."<br>\n"
                ."Address2: ".$address2."<br>\n"
                ."Town: ".$town."<br>\n"
                ."County: ".$county."<br>\n"
                ."Postcode: ".$postcode."<br>\n"
                ."Property Type: ".$propertyType."<br>\n"
                ."Property Area: ".$propertyArea."<br>\n"
                ."Rear ground extension: ".$rearExt."<br>\n"
                ."Side ground extension: ".$sideExt."<br>\n"
                ."Two-storey rear extension: ".$twoStoreyRear."<br>\n"
                ."Two-storey side extension: ".$twoStoreySide."<br>\n"
                ."Loft conversion: ".$loft."<br>\n"
                ."New build: ".$newBuild."<br>\n"
                ."Flat: ".$flat."<br>\n"
                ."Other: ".$other."<br>\n"
                ."Message:<br>\n"
                .$message;
      if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
        echo "That is not a valid email address.  Please return to the"
               ." previous page and try again.";
        exit;
        mail($toemail, $subject, $body, $msg, $headers);
        echo "Thanks for submitting your comments";
    ?>
    </body>
    </html>

    Dear David
    Thank you so much for the clear explanation. I have been using Lynda.com Dreamweaver CS5 tutorial. I found the coding for checkbox through search and added to the coding from Lynda.com tutorial.
    I made few changes to the coding by removing:
    $msg = "$rearExt<br>\r\n$sideExt<br>\r\n$twoStoreyRear<br>\r\n
              $twoStoreySide<br>\r\n$loft<br>\r\n$newBuild<br>\r\n$flat<br>\r\n$other\r\n";
    as the email message shows the results from the checkbox twice.
    I also removed the <br> from:
    $body = "Name: $name<br>\r\n
              Email: $email<br>\r\n
              Contact No: $contact_number<br>\r\n
             Other: $other\r\n
              Message:\r\n
                $message";
    I have add the result and the PHP coding you have helped to fixed for anyone needing a working PHP code containing Text Fields, Drop Down List, Checkbox and Text Area. Many thanks for all your help. If you have a coding to change the heading text colour I very much appericate it.
    Message sent to email:
              From: Name test <[email protected]>
                 Content-type: text/html; charset=iso-8859-1
    Name: Name test
              Email: [email protected]
                      Contact No: 0123456789
                      Address1: addy1
                      Address2: addy2
                      Town: T
                      County: C
                      Postcode: P/C
                      Property Type: End of Terrace
                      Property Area: Listed Building
                      Rear ground extension: Rear ground extension: No
                     Side ground extension: Side ground extension: No
                     Two-storey rear extension: Two-storey rear extension: Yes
                     Two-storey side extension: Two-storey side extension: No
                     Loft conversion: Loft conversion: No
                     New build: New Build: No
                     Flat: Flat: Yes
                     Other: Other: No
             Message:
               Test message
    PHP coding for customer contact page:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
    <title>Email Form</title>
    </head>
    <body>
    <?php
      $name=$_POST['name'];
      $contact_number=$_POST['contact_number'];
      $email=$_POST['email'];
      $address1=$_POST['address1'];
      $address2=$_POST['address2'];
      $town=$_POST['town'];
      $county=$_POST['county'];
      $postcode=$_POST['postcode'];
      $propertyType=$_POST['propertyType'];
      $propertyArea=$_POST['propertyArea'];
      $rearExt= isset($_POST['rearExt'])?"Rear ground extension: Yes":"Rear ground extension: No";
      $sideExt= isset($_POST['sideExt'])?"Side ground extension: Yes":"Side ground extension: No";
      $twoStoreyRear= isset($_POST['twoStoreyRear'])?"Two-storey rear extension: Yes":"Two-storey rear extension: No";
      $twoStoreySide= isset($_POST['twoStoreySide'])?"Two-storey side extension: Yes":"Two-storey side extension: No";
      $loft= isset($_POST['loft'])?"Loft conversion: Yes":"Loft conversion: No";
      $newBuild= isset($_POST['newBuild'])?"New Build: Yes":"New Build: No";
      $flat= isset($_POST['flat'])?"Flat: Yes":"Flat: No";
      $other= isset($_POST['other'])?"Other: Yes":"Other: No";
      $message=$_POST['message'];
    // you can specify which email you want your contact form to be emailed to here
      $toemail = "[email protected]";
      $subject = "From Website Test";
      $headers = "MIME-Version: 1.0\r\n
                 From: $name <".$email.">\r\n
                 Content-type: text/html; charset=iso-8859-1";
      $body = "Name: $name\r\n
              Email: $email\r\n
              Contact No: $contact_number\r\n
              Address1: $address1\r\n
              Address2: $address2\r\n
              Town: $town\r\n
              County: $county\r\n
              Postcode: $postcode\r\n
              Property Type: $propertyType\r\n
              Property Area: $propertyArea\r\n
              Rear ground extension: $rearExt\r\n
              Side ground extension: $sideExt\r\n
              Two-storey rear extension: $twoStoreyRear\r\n
              Two-storey side extension: $twoStoreySide\r\n
              Loft conversion: $loft\r\n
              New build: $newBuild\r\n
              Flat: $flat\r\n
              Other: $other\r\n
              Message:\r\n
                $message";
      if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
        echo "That is not a valid email address.  Please return to the"
               ." previous page and try again.";
        exit;
        mail($toemail, $subject, $body, $headers);
        echo "Thanks for submitting your message";
    ?>
    </body>
    </html>

  • I want to insert some checkboxes in a JList

    ...is it possible?
    I tried, but it inserts a string!
    This is my code:
    JList list = new JList();
    panel.add(list);
    CheckBox check = new JCheckBox("Yes");
    DefaultListModel model = new DefaultListModel();
    model.addElement(check);
    list.setModel(model);
    // I am able to see only the String "javax.swing.JCheckBox[,0,0,0x0, invalid,alignmentX=0.0,alignmentY=0.5,border=javax.swing.plaf.BorderUIResource$CompoundBorder.....text=User Prefix]"
    Thank you!

    Hi Sorin,
    you can aquire your data in a loop and use shift registers to store your data (use an array). To get the maximum of the array there is a function in labview "Array Max & Min".
    Hope this helps.
    Mike

  • How to make the Sourcelist checkbox in Material MasterPurch view- Mandatory

    Hi All,
    Can anyone please let me know how to make the Source list checkbox mandatory in Material Master.
    Ie for example if i am creating and ERSA Material, i want to make the source list option mandatory by default whenever i create an ERSA Material. I know the option to make the Source List mandatory at Plant Level.
    But i want to make source list mandatory at material. By default..it has to appear mandatory on the Material. I want to do this
    specially based on Material Type. Ie i want this to be mandatory only for specific material types i chose.
    Please suggest me the possible ways.
    Thanks
    Sridevi

    Hi, Get Source List Field sel. group from OMSR which is 16 by default change it to new field say 210, then goto OMS9 enter Field sel. group 210,  Check for field 'MARC-KORDB' & change it to mandatory for Field reference ERSA, if you cannot find there you need to create new field reference & assign it to ERSA in OMS2 &

  • I have no Ringtones Tab or Checkbox

    So I have been researching how to make and import Ringtones.  Well, I have successfully done it but my ringtones are not synching to my phone.  I have gone into Preferences>to allow the Ringtones tab to appear in the panel, however I do not have one.  I have a Tones box to check, but that doesn't seem to repair the issue.  Why don't I have a Ringtones box, that will create a Ringtones tab?
    I have an iPhone 4, iTunes 10 and am using a Mac to sync.  Thanks!

    Here is my setup.  Windows 7 64bit (PC), Iphone 4S (64gb), Sprint Service.  I own all the Copytrans programs.
    Hello...The Apple store was no help on this and I haven't been impressed with them the last few times I went there for help. Nice to know I spent a lot of money on Apple Care.   I did get a wonderful person that helped me on Apple Care the first time I called but again the last few times were not helpful.  The tech support people all need to be on the same page on how to do the different things with your apple product.
    I spent hours trying to figure out how to get the stupid Ringtones folder to show up in itunes. I uninstalled itunes then reinstalled it but no luck.  All I get is a Tones Tab.   I did as you mentioned and I bought one ringtone.  Itunes still did not make the folder for me but my  Copytrans Manager did. http://www.copytrans.net/  Inside the folder was my one ringtone I bought.  I then dragged all my ringtones I downloaded from Zedge over to the ringtones folder and synced it up with CopyTrans Manager which put all the new ringtones on my phone.
    After trying CopyTrans Manager and not having any luck with my iphone playing my ringtones on the phone I then dragged the files to the Library on Itunes which put the files in the Tones folder.  I tried to sync them with itunes but it would not work so I used Copytrans Manager to do this which put the ringtones on my iphone.  The only problem now is it doesn't matter what ringtone is set up for a contact it always plays the default Marimba ringtone and none of the other ones.
    I think my itunes stopped working again as it will not sync anything I do now.  I back up everything to the icloud.  I like having a copy on the computer and on icloud.
    When I select my device name at the top it shows:
    Summary / Info / Apps / Tones / Music / Movies / TV Shows / Books / Photos
    On the PC I've gone into Itunes under Edit / Preferences and under sources I have these selected:
    Moves / TV Shows / Books / Apps/ Tones / Radio / Ping / Genius / Shared Libraries
    Down below that Show Source Icons and Show List Checkboxes are checked
    Parental Tab:  I have nothing disabled
    Under the Advanced Tab:
    Copy Files to iTunes Media Folder when adding to Libary is checked
    Now if I go to the Tones Tab under my Device Name and select Sync Tones / All Tones.  I get a message that says "Are you sure you want to synce tones?  All existing tones on the Iphone (Device Name) will be replaced with tones from your itunes libary."  Fine I select this.
    When I do that I loose all my music that I used Copytrans manager to sync with.  My Libary has no music listed but my Device (Device Name) under the music tab shows all my music.  CopyTrans Manager is so much easier to work with than itunes.  I tried to drag all my music from my Device music tab to my libary on itunes but that didn't work. 
    So I press the sync button on the buttom of itunes and it says:
    The iphone (Device Name) is synced with another itunes library.  Do you want to erase this iphone and sync this with itunes library?  An iphone can be synced with only one itunes library at a time.  Erasing and syncing replaces the contens of this iphone with the contents of this itunes libary. 
    Options:  Erase and Sync / Cancel  I chose cancel
    I dont have a problem with erasing all my music and starting over.  I have all my store bought CD's that I can put back on itunes.  I just dont want everything else erased like my apps and photos.  For my photos I use CopyTrans Photo.  I understand my Pictures and music are not on itunes and this is why my libary on itunes and my iphone are different.  what a pain just trying to get a ringtones tab and getting everything synced up.
    Any help would be great.

  • Display checkbox dynamically

    hi,
    i am trying to generate list(checkbox) dynamically
    through query
    select classname from class where secid1=
    select secid from section
    where section.secname=:P7_SECNAMEX
    :p7_secnamex is a text which contain section name
    Through this though i am able to generate checkbox dynamically but i want every time a user enter new section name a new checkboxes should get create on new line without replacing previous one, in mycase it replaces the previous one.
    how can i do this,pls any one can help me out.

    Enough with this ..... link
    http://www.oracle.com/technology/products/database/htmldb/howtos/checkbox.html
    How many times do we have to see it in the forum....Enough.....
    Its so frustrating giving the same link time and time again...And the funny
    part is that most people's questions has nothing to do with that. But
    still some geniuses give the same link....I just feel so sorry for people
    who are struggling to get a answer and some idiots give the same link

  • CHECK BOX IN DROP DOWN LIST

    HI PLS TELL ME HOW TO INSERT CHECK BOX IN DROP DOWN LIST.
    NITIN

    Hi,
    You can select only one value from dropdown list.Checkboxes are to select more than one.Why do you need checkbox in drop down??
    Thanks,
    Keerthi

Maybe you are looking for

  • I just want to sync the calendar

    Ever since I turned on iCloud, it has been a calendar nightmare.  I have tried to turn off iCloud and go back to syncing the way that actually works, with a wire. Several things: 1.  When I got my calendar events all re-entered for the second time, I

  • Time machine no longer works with iLife

    I try to open Time Machine with iPhoto, and it no longer works. Please fix this soon.

  • How do I save a board outline as part so that it can be placed on new designs?

    I made the mistake of using one of Ultiboards PC104 predefined board outlines. The problem is the board outline screw holes are the size of screw head not the thread. Is there a way that I can make board outlines that I can "Place" in a similair fash

  • Retrieve tables and column names in a universe

    Hi - Is there a way to retrieve tables and columns used in a given universe? We have to do analysis and need to know the tables as well as fields used anywhere in any object defined in the universe. I tried Query Builder and did some selection on ci_

  • Correction Invoice Poland, 2. Returns

    Dear all! I have a problem with a returns in poland. If they book the first returnshipment, the correction invoice is okay (quantity and amount). But, if the customer brings goods back again to the same invoice, SAP show me the wrong amount. I will e