Making Check box a required field

Hi Guys,
I am currently creating a form to put on my website and it is
working okay. However, I want a check box for people to tick
confirming they have read the terms and conditions.
I cannot work out how to make it so the form will not send
without the box bring ticked.
If i could get it set up so that when trying to submit the
form without having the box ticked it would leave a message
explaining the box needs to be ticked that would be good to!
Can anyone help me please? Am at my wits end!!!

On 19 Mar 2007 in macromedia.dreamweaver, jameshuk wrote:
> I am currently creating a form to put on my website and
it is
> working okay. However, I want a check box for people to
tick
> confirming they have read the terms and conditions.
>
> I cannot work out how to make it so the form will not
send without
> the box bring ticked.
>
> If i could get it set up so that when trying to submit
the form
> without having the box ticked it would leave a message
explaining
> the box needs to be ticked that would be good to!
The only way to do that client-side is with Javascript (which
is not a
bad measure for cutting down on spambots), but it's not
reliable. The
only way to do it reliably is serverside. PHP:
<?php
if ($_POST['checkbox'] == 'checked') {
// Process form
} else {
// Send back to check checkbox
?>
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/email.php

Similar Messages

  • Making First Name a Required Field

    Hello everyone!
    I'm attempting to make the first name attribute on the user form (For direct user creation via xelsysadm) required.
    I have 5 current user accounts (And tons of old deleted accounts), all of which have first names. However, when I go to the "User Configuration" page and attempt to make the field required, OIM 11g tells me that all users must have a value for that field....
    Is there an easier way to do this (Such as metadata manipulation?) If so, which xml is it?
    Lastly, how can I get UDFs to be displayed on request-based user creation. I've used an authorization policy to view/modify the attribute, but it still doesn't show up.
    Thanks in advance!

    Let's do it by parts.
    1 - To check which accounts don't have a "First name", connect to your database repository as OIM account owner (usually DEV_OIM):
    select usr_login, usr_first_name, usr_last_name from usr
    where usr_first_name is null
    order by usr_login2 - The metadata xml file is /file/User.xml, use the metadata import/export feature to modify the required fields;
    3 - Follow BB's tip, and that note will show you how to do it.

  • Various Selections in Combo Box trigger required field

    Can anyone assist me in creating a multiple if/else statement? I have a combo box which lists all departments within my organization. I am needing assistance in creating an if/else statement that basically says if the department name is equal to say Finance, Accounting, Purchasing, etc. that a signature field is hidden because it is not required. However, if the department name were Information Services, Library, etc. the signature field would be required.
    I can get this to work if I use just one value (i.e. Finance), but when I add other values (and I've tried different methods) nothing happens.
    Thank you for any assistance you may provide.

    Check your JavaScript debugger console for errors.
    var s1 = this.getField("RBDeptHdYes").valueAsString;
    var s2 = this.getField("State").valueAsString;
    var s3 = this.getField(CMSignature); // field name must be in quotes
    if ( s1 == "Yes")
    s3.required=true;
    if (s2 != "Texas"); // no ";" here
    s3.required=true;
    if (s1== "Yes" && s2 == "Texas")
    s3.required=true;
    else
    s3.hidden=false;
    I might be easier to crate a control variable that can be set to true or false by each test and then test the control variable at the end.
    var bRequired = false; // assume not required
    this.getField("CMSignature").hidden = true; // hide field
    var s1 = this.getField("RBDeptHdYes").value;
    var s2 = this.getField("State").value;
    if ( s1 == "Yes") bRequired = true; // required
    if (s2 != "Texas") bRequired = true;
    if (s1== "Yes" & s2 == "Texas") bRequired = true;
    if (bRequired) this.getField("CMSignature").hidden = false; // signature is required
    Your script has to be placed in the "mouse up" for the radio buttons and the "blur" action for the state combo box so that when any one of these fields is changed, the script will run. This means that whenever your requirements change, each location will have to be updated unless you use a document level function which is called by each field as needed and then only the function's code would need to be changed.

  • Popup check box screen for fields selection using user structure

    Hi all,
    could you please help how can i get the popup screen in the program when the user wants to choose the wanted fields.
    for ex: in the table after clicking the contents display the selection fields will be displayed. there in setting -> list format->choose, we can check the fields wanted to be displayed. The same functionality i needed with my own structure. can any one help me in this, it is urgent.
    Thankyou.

    Hai Ashok
    Check the following Code
    S_FIELDS-TABNAME = 'VBAP'.
    S_FIELDS-FIELDNAME = 'ARKTX'.
    S_FIELDS-VALUE = WC_VALUE.
    APPEND S_FIELDS.
    CALL FUNCTION 'POPUP_GET_VALUES'
      EXPORTING
      NO_VALUE_CHECK        = ' '
        POPUP_TITLE           = 'Locate Material'
      START_COLUMN          = '5'
      START_ROW             = '5'
    IMPORTING
      RETURNCODE            =
      TABLES
        FIELDS                = S_FIELDS
    EXCEPTIONS
       ERROR_IN_FIELDS       = 1
       OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
    READ TABLE S_FIELDS  INDEX 1.
    WC_VALUE = S_FIELDS-VALUE.
    ENDIF.
    Thanks & regards
    Srenivasulu P

  • Check boxes, name fields, and interactivity in Acrobat/InDesign

    I posted this in the InDesign forum and am lead to believe it is impossible to do through InDesign...
    [quote]
    We are a high production print shop and do most of our proofing via PDF. We email the customer a PDF and they print it out, show it to their customer, mark changes, and fax it back to us. We'd like to start letting the customers email their proofs back to us with a check box marked for either OK or Changes Needed, as well as a place for a name and date.
    It appears that InDesign will not do this natively. I can make Acrobat do this, no problem. What I tried to do was to take a PDF of the "Proof OK" box with the check boxes and name fields and drop it into InDesign in hopes that the embedded PDF would hold it's interactive capabilities. It does not.
    Is there a way to make this work like I need without a bunch of scripting in a language I don't know well? Taking the hundred or so proofs each day and manually making them interactive PDFs is not really an option for obvious time reasons.
    Thanks,
    Mike
    [/quote]

    I thought you could create form fields in InDesign that would carry over to the PDF...
    But if you can't, you could (get someone to) create a batch process that adds the required fields. It wouldn't cost much. ;^)
    George

  • Exporting PDF from InDesign with check boxes & name fields

    We are a high production print shop and do most of our proofing via PDF. We email the customer a PDF and they print it out, show it to their customer, mark changes, and fax it back to us. We'd like to start letting the customers email their proofs back to us with a check box marked for either OK or Changes Needed, as well as a place for a name and date.
    It appears that InDesign will not do this natively. I can make Acrobat do this, no problem. What I tried to do was to take a PDF of the "Proof OK" box with the check boxes and form fields and drop it into InDesign in hopes that the embedded PDF would hold it's interactive capabilities. It does not.
    Is there a way to make this work like I need without a bunch of scripting in a language I don't know well? Taking the hundred or so proofs each day and manually making them interactive PDFs is not really an option for obvious time reasons.
    Thanks,
    Mike

    This can't be done in ID, but I'd bet they can help you on the Acrobat Scripting forum. It shouldn't be too hard to do a script that only adds approval checkboxes and sets the document for commenting.

  • How to use a check box in ALV

    Hi All,
    I have a urgent requirement in my <b>ALV list</b>.
    Where in the output list i need to create a check box, which is followed by Sales order, quantity columns etc......
    Requirement:  1. tell me how to <b>create</b> a <b>check box</b>
    2.   i need to select the checkbox(Sales Order) and press  a push button which is above the list(push button) in the tool bar.
    I am able to see the output using  <b>reuse_alv_grid_display</b>.
    <b>But kindly let me know how to <b>link</b> the <b>check box</b> and the <b>push button</b> which is above the list for further processing.</b>
    Possibly a sample code will help a lot.
    Thanks in advance.
    Rajesh Kumar.

    TO create a check box, take one field in your internal table as:
    CHK TYPE C.
    Now, pass the LAYOUT by filling up the LAYOUT strucutre.
    LAYOUT-BOX_FIELDNAME = 'CHK' .
    This will provide you the BOX field in the GRID and Checkbox in the LIST.
    When you select the  checkbox the field value will set to 'X' in the table.
    Regards,
    Naimesh Patel

  • Check Box in Header of ALV GRID only............

    Hi Experts,
                   Can anyone help me out... in keeping the Check box at the Header Level.....
    This requirement is in the copy of the standard transaction "ME2N". 
    1. In ME2N when you click on the Chage Layout button of ALV grid
    and choose "Sorting" tabe.
    2. Add any 3 fields say 1. Vendor/Supply plant 2. Purchasing group and 3. Purchasing document in the Sort criteria and choose accending order radio button and check box in the sum .
    3. Now click on the Displayed Column tab and remove the above 3 fields from the Displayed colums and add it column set
    4. Now report shows the heirarchial one in the sorting manner.
    5. I want the Check Boxes at all levels both in the header and the item level.
    When I click on the Header level check box all the item level check box should get checked. When I add the check box in the field catalog I am able to see the check box in the item level only because only item level data appears in the internal table and Header level is displayed based on the ALV grid sorting option and that row records are unknown in the internal table.
    Is there some thing which I can do to get the check box at the header level retaining all the functionality of ME2N and ALV GRID.....
    It would be great help if some one solves me this issue... Points will be awarded.
    Br,
    Laxmi.

    Hi Bharath,
               Thanks for your response. Select ALL already existing... My requirement is not to get the whole report records selected at  particular level all items and header should get selected. Say for example  I have Vendor2 i.e,  vendor 1 and vendor2. So in the Vendor 1 i will have Purchasing group1 , Purchasing document 1 and say 10 items under Purchasing document. say same as like in Vendor2. So if Click on the Vendor1 all the sub items of it have to selected so that I can perform further action only for these items not for the enter items of the report.
    Br,
    Laxmi.

  • HELP! How do I enforce a required field

    All
    I do hope someone can help me with this!!!
    I have a pdf where I require the person before submitting to check a check box to confirm they understand a key statement. the checkbox is called Confirm.
    I have seen some javascript here http://forums.adobe.com/thread/784322 which uses on blur - but the assumption is that the user has tabbed into the field concerned... what if they skip over it?
    So... I decided to put some Javascript into the submit button...
    the submit button currently has 3 Actions on mouse up
    first it runs the following javascript
    if (Confirmed.value.length == 0)
        {app.alert("The confirmation box must be checked. Please confirm.")
    then it performs  file>save as>pdf
    then it performs submit a form and emails the pdf
    My question is - Why if you have denoted a field as required does adobe allow you to save and email a form where these fields have not been completed??? surely this is a huge bug??
    ok... but the logic I put in with the first javascript does not get triggered, can anyone explain why not? .... more importantly... can anyone help me with some code which achieves this desired effect -
    when the form is submitted, I need to check if the checkbox has been checked and if not display the above alert AND exit out of the rest of the submit actions.
    thanks
    george

A: HELP! How do I enforce a required field

It is not at all a huge bug. Some thoughts:
1. Your script isn't working because it's not correct. If you want to check the state of a check box and do something based its state, the code could be something like:
// Get the value of the check box with the field name "Confirmed"
var v = getField("Confirmed").value;
// The field value with either be the string "Off" (if not selected) or the export value (if selected)
if (v !== "Off") {
    // Proceed with the submit here
    submitForm({cURL: "[email protected]", cSubmitAs: "PDF"});
} else {
    // Check box not selected. so alert the user
    app.alert("You must select the \'Confirmed\' check box before you can submit this form.", 3);
2. Even if a check box is set as required, it won't prevent the submit form action or JavaScript from submitting. This is because the field always has a value. This is different for a radio button group. If none in a radio button group that is makred as required is selected, then the submit won't be allowed to take place until one is. This is just how it works, so you have to use a script instead as shown above.
3. Can you explain why you want to save the form before it is submitted? It is automatically done when the entire PDF is submitted, so there normally wouldn't be a need to do this.
4. Use just a single JavaScript action. If you use multimple actions, the are independent from one another, so one can't prevent a subsequent one from being triggered.

It is not at all a huge bug. Some thoughts:
1. Your script isn't working because it's not correct. If you want to check the state of a check box and do something based its state, the code could be something like:
// Get the value of the check box with the field name "Confirmed"
var v = getField("Confirmed").value;
// The field value with either be the string "Off" (if not selected) or the export value (if selected)
if (v !== "Off") {
    // Proceed with the submit here
    submitForm({cURL: "[email protected]", cSubmitAs: "PDF"});
} else {
    // Check box not selected. so alert the user
    app.alert("You must select the \'Confirmed\' check box before you can submit this form.", 3);
2. Even if a check box is set as required, it won't prevent the submit form action or JavaScript from submitting. This is because the field always has a value. This is different for a radio button group. If none in a radio button group that is makred as required is selected, then the submit won't be allowed to take place until one is. This is just how it works, so you have to use a script instead as shown above.
3. Can you explain why you want to save the form before it is submitted? It is automatically done when the entire PDF is submitted, so there normally wouldn't be a need to do this.
4. Use just a single JavaScript action. If you use multimple actions, the are independent from one another, so one can't prevent a subsequent one from being triggered.

  • Check box in SAP Query selection screen

    I want to keep 2 check box in SAP Query selection screen.
    could you please tell me any one.
    regards,
    kumar

    Hi Vijay,
    If these check boxes are the fields in the table you are using then you can do it in SQ01, otherwise you may required to make the changes in the standard code generated for that query.
    You can find the name of the generated program of the query when you execute the query.
    Reward points if useful.
    Regards,
    Atish

  • Conditional Required Fields

    Is it possible to have conditional required fields. As in if a certain box is selected, certain fields will become required. Take a look at this example if this needs clarification. In this example, the left 3 text boxes are required. If I check the middle checkbox, can I make it so the 3 text fields in the middle now become required as well. Furthermore, if I check off the 3rd check box (rightmost one), can I make all of the text boxes as required fields. Thanks!

    Hope You have the code on the check box change event, which decides the need of required or not.
    if(this.rawValue =='1')
    TextField1.mandatory = "error";
    TextField2.mandatory = "error";
    TextField3.mandatory = "error";
    Gender.mandatory = "error";
    Gender.border.edge.color.value = "225,0,0";
    else{
    TextField1.mandatory = "disabled";
    TextField2.mandatory = "disabled";
    TextField3.mandatory = "disabled";
    Gender.mandatory = "disabled";
    Gender.border.edge.color.value = "0,0,0";
    If you have facing any problem send me ur form to [email protected] if possible, If need sample give me ur email id so that i can post the form.
    RAGHU.

  • Required field adobe pro

    I have a client where the built in check box on the field is not working.  I was hoping to be able to accomplish this via code, I saw a discussion on here with some code listed in onblur but will it work if the check box is not touched but the form is submitted?  Is there code to handle this? is the check box in the field properties supposed to put something in that area or add js to the form?

    Thanks for reply. What I am trying to achieve is to give an option for the user to download the pdf form and once the user tries to save the pdf, it validates with the required field. I managed to create the editable pdf with required fields option. I just need that validation to be done when user click on save file. How can I achieve this? thanks so much for your help.

  • SQ01 -  Include a check box on ABAP query Selection screen

    Hi Experts,
    For my Abap Query, on the selection screen i am planning to include a check box such that if i click on the check box then a field will be displayed in the resulting output . On the other hand if i do not check on i should not be able the field in the output.
    Please tell me how do i do this.
    Thanks
    Venkata Pradeep.

    In infoset, Extras code tab
    Code section: At selection-screen output
    Do something like below:
      IF radiobutton1 = 'X'.    
         LOOP AT SCREEN.      
              IF screen-group1 = 'XXXX'.         "XXX is the filed group name you want to hide., you have to                                                                  find out what is it.
                   screen-input = '1'.        
                   screen-invisible = '0'.        
                   MODIFY SCREEN.      
              ENDIF.    
         ENDLOOP.  
    ELSE.   
         LOOP AT SCREEN.     
              IF screen-group1 = 'XXX'.        
                   screen-input = '0'.       
                   screen-invisible = '1'.       
                   MODIFY SCREEN.     
              ENDIF.   
         ENDLOOP. 
    ENDIF.

  • Checks Boxes in a Grid

    Hi Experts,
    I am binding my data to a grid and after that i have added a check box column as last column and i kept the Grid Collapse level as  2.My data is binded as following
    COL1                COL2           COL3                     COL4
      A                                                      Checkbox1
                         A1                                  Checkbox2
                                       A11                   Checkbox3
                                       A22                   Checkbox4
      B                                                      Checkbox1
                        B1                                   Checkbox2
                                       B11                   Checkbox3
                                       B22                   Checkbox4
      C                                                      Checkbox1
                        C1                                   Checkbox2
                                       C11                   Checkbox3
                                       C22                   Checkbox4
    Now i am unable to check the  Checkbox1, Checkbox2 of A and A1 , B and B1,C and C1.But i can check the other check boxes.My requirement is if i check  Checkbox1 of A or B or C the respective checkboxes in that group have to be checked.
    Please help me regarding this problem.
    Regards.
    Rajesh.

    Hi Experts,
    I am binding my data to a grid and after that i have added a check box column as last column and i kept the Grid Collapse level as  2.My data is binded as following
    COL1                COL2           COL3                     COL4
      A                                                      Checkbox1
                         A1                                  Checkbox2
                                       A11                   Checkbox3
                                       A22                   Checkbox4
      B                                                      Checkbox1
                        B1                                   Checkbox2
                                       B11                   Checkbox3
                                       B22                   Checkbox4
      C                                                      Checkbox1
                        C1                                   Checkbox2
                                       C11                   Checkbox3
                                       C22                   Checkbox4
    Now i am unable to check the  Checkbox1, Checkbox2 of A and A1 , B and B1,C and C1.But i can check the other check boxes.My requirement is if i check  Checkbox1 of A or B or C the respective checkboxes in that group have to be checked.
    Please help me regarding this problem.
    Regards.
    Rajesh.

  • Check box in a Grid

    Hi Experts,
    I am binding my data to a grid and after that i have added a check box column as last column and i kept the Grid Collapse level as  2.My data is binded as following
    _COL1        COL2      COL3                      COL4_
    A                                                        Checkbox1
                      A1                                    Checkbox2
                                    A11                   Checkbox3
                                    A22                   Checkbox4
    B                                                       Checkbox1
                     B1                                    Checkbox2
                                    B11                   Checkbox3
                                    B22                   Checkbox4
    C                                                        Checkbox1
                     C1                                    Checkbox2
                                    C11                   Checkbox3
                                    C22                   Checkbox4
    Now i am unable to check the  Checkbox1, Checkbox2 of A and A1 , B and B1,C and C1.But i can check the other check boxes.My requirement is if i check  Checkbox1 of A or B or C the respective checkboxes in that group have to be checked.
    Please help me regarding this problem
    Regards.
    Rajesh.

    Please answer my question...

  • Maybe you are looking for

    • Data transfer problem between Oracle 9 and Oracle 8

      We have two enviroments one in oracle 9 and other is oracle 8, both are on different unix servers. There is a DBlink for Oracle 8 on the oracle 9 database. Now when we try to select any data from oracle 9 and insert into oracle 8 using the dblink all

    • SAP_CR has encountered a problem and needs to close

      Hi, I have a client currently using SAP B1 2007 SP00 PL47. They have multiple SAP B1 companies set up. SAP Crystal Report(CR) integration Add On is installed. Crystal Report 2008 is also installed. My client logon to SAP company A, run a report from

    • Need help reseting

      I have a little problem with resseting my Mac Mini late 2007 model with osx 10.5.8. The problem is that when I do the trick with the option key, I seem to not have a recovery. So what is te problem?

    • How to maximize a window and can't be able to move it

      Hi everyone, I'm doing an HMI and what I want to do is to maximize a window. I can do it in the VI proprieties -> Window Run-Time Position -> Position: Maximized. The problem I get is when I run it, the user can move the window with the title bar. I

    • Get the pixel of the video ?

      Hello, I'd like to use OSMF, but I need to make some operation on the pixel Without OSMF, I'm using something like :         private var connection:NetConnection;         private var stream:NetStream;         private var video:Video ;         private