List/Menu, TextField & amp; TextArea with initial values

I have an html form that uses the intrusion via cfmail to send data to my email. On the form, there is some initial values I want to display empty if the values are the same as the initial values. How can I do this (or is it possible)?

Example 1: List/Menu (initially selected):
If the originally selected value = "Please indicate 1 2 3 Maj" then leave blank. Otherwise show some other value of the option that was selected.

Form.htm
< select name = "046 a" id = 046 'a' >
< option value = "Please indicate 1 2 3 Maj" selected = "selected" > please indicate 1-2-3 SHIFT < / option > "
< option value = "1st shift" > 1st shift < / option >
< option value = "2nd quarter" > 2nd quarter < / option >
< option value = "3rd quarter" > 3rd quarter < / option >
< / select >

CFMAIL.cfm
#Form.046a # full time

Example 2: TextField with the initial value:
If the originally selected value = 'Please spΘcifier' then leave blank. It does not show any new text that was entered.

Form.htm
< input name = "003" type = "text" id = "003" onfocus = "this.value ="; "" " This.onfocus = null; ' value = 'Please spΘcifier' size = '35' / >

CFMAIL.cfm
Others. ...: #Form.003 #.

Example 3: TextArea with initial value:
If the originally selected value = "Work" then leave blank. It does not show any new text that was entered.

Form.htm
< name textarea = "107" cols = "44" lines "5" = class = "textHideScroll" id = "107" onfocus = "this.value ="; "" " This.onfocus = null; "> work < / textarea >

CFMAIL.cfm
Work carried out. ...: #Form.107 #.

Thank you

Jeff

Quote:
Posted by: emmim44
You store data in db or not? If this isn't the case, every time when you submit the form it will be more to write the old value of form fields... You can store the value in a session variable and compare with the new value of form field... Hope it helps...

Thanks, but I already had my question answered when I posted the following message title:
«Question text box»

I will mark this as the answer to prevent others to respond.

Thanks again,

Jeff

Tags: ColdFusion

Similar Questions

  • Initial value of the checkbox field is not affected.

    Hello

    I have a custom form with 2 fields, which is a check box which is below the values
    Value when checked: 1
    Value when disabled: 0
    Mapping of other values box: checked

    and the other is a text field. Please insert text fields field data into the table db that are checked.

    Iof displayed the Web file number is 10.


    I use the code in the trigger of the COMMIT BUTTON to save data in the table below. that is, I'm insertion of the value of the text field in table for the check box that is checked

    GO_BLOCK ("CHANNELS");
    premier_enregistrement;
    LOOP
    IF: CHANNELS. CHECK = 1 THEN
    INSERT into...
    WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
    NEXT_RECORD;
    END LOOP;
    COMMIT;
    END;


    The problem is the value of the checkbox is always null and records are not get inserted into the table. Y at - it elsewhere, that we have to specify the initial value of the box. Not sure why the value of the checkbox becomes void even if the ix checked checkbox.

    Thank you
    Didi.

    What you have listed for the property of the initial value of your box?

    Craig...

  • for any given initial value error message

    Hello experts,

    I created a form with the period_type as a drop-down list and do not specify an initial value. But I have this warning msg. How can I get rid of that?

    FRM-30188: no given initial value and other values are not allowed (point EFT_PERIOD. PERIOD_TYPE).
    List PERIOD_TYPE
    Block: EFT_PERIOD

    Thank you

    Open the mouth of property for this EFT_PERIOD article. PERIOD_TYPE and property in the LIST ITEM just remove the value of handguns as well as the return value for the first value, then compile the form.

    First value will be like LIST123 just delete this value and then try...

    -Clément

  • Populating a drop-down menu form with the values from MySQL database

    I'm creating a simple CMS that will allow staff to add new items on their site (sale of furniture).

    I want them to be able to choose from the list of values for some fields to ensure that the items are displayed on the website correctly (IE to avoid typos etc.).

    I have spent a lot of time to trawl forums and have so far obtained the code below.  When it was working I could only get the dropdown menu options of data contained in the database, as opposed to the list of DEFINED values that initially, I would put in my database.

    For example under the field named 'Type', I assigned these values: all ('table', 'chair', 'buffet', 'convenient', 'bottles', 'library', 'mirror', 'drawers','s chest', 'display', 'tvunit', "bedside", reads, "wardrobe", 'dressingtab', 'blanketbox', 'Office', 'filing cab', "workstation")

    Here's what I want to display in the drop-down, not only the five values of elements already in it.

    However, my CMS page is nothing display now not in the drop down and I can't understand why not!

    So my question is, first of all any ideas what's wrong with my code?  And second, how to fill the bottom of the fall with SET values?

    Thank you very much in advance for your help!

    I didn't want to bore you, then the code below is just the bit that is relevant to my question, rather than any connection $POST and info php etc.

    It is in my code php at the top of my page

     $sql = mysql_query("SELECT DISTINCT id, supplier, room, type, material, finish, bespoke, image FROM furniture ORDER BY ASC");
    
                        while($row = mysql_fetch_assoc($sql))
                        {
                    $supp .= "<option value=\"{$row['supplier']}\">{$row ['supplier']}</option>";
                    $room .= "<option value=\"{$row['room']}\">{$row['room']}</option>";
                    $type .= "<option value=\"{$row['type']}\">{$row['type']}</option>";
                    $material .= "<option value=\"{$row['material']}\">{$row['material']}</option>";
                    $finish .= "<option value=\"{$row['finish']}\">{$row['finish']}</option>";
                    $bespoke .= "<option value=\"{$row['bespoke']}\">{$row['bespoke']}</option>";
                        } 
    

    It's in my html code

    <form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="form1"  id="form1">
    
                    <label for="supplier">Manufacturer</label>
                    <select name="supplier" id="supplier" title="<?php echo $row_add['supplier']; ?>" >
                      <? echo $supp; ?>
                     </select>
           
    
                     <label for="room">Room</label>
                    <select name="room" id="room" title="<?php echo $row_add['room']; ?>" >
                      <? echo $room; ?>
                     </select>
    
                           <label for="type">Type</label>
                          <select name="type" id="type" title="<?php echo $row_add['type']; ?>">
                           <? echo $type; ?>
                          </select>
       
    
                          <label for="material">Material</label>
                          <select name="material" id="material" title="<?php echo $row_add['material']; ?>">
                          <? echo $material; ?>
                              </select>
           
                              <label for="finish">Finish</label>
                          <select name="finish" id="finish" title="<?php echo $row_add['finish']; ?>">
                            <? echo $finish; ?>
                              </select>
       
                           <label for="bespoke">Can be made-to-measure?</label>
                           <select name="bespoke" id="bespoke" title="<?php echo $row_add['bespoke']; ?>">
                          <? echo $bespoke; ?>
                          </select>
    
                                  <input type="Submit" name="Add" id="add" value="Add" />
                          <input name="date" type="hidden" id="hiddenField" value="<?php echo $todayis['date']; ?>">
                          <input type="hidden" name="MM_insert" value="form1" />
                          </form>
    

    > So, don't you think not with my different approach?

    Yep, that's how it should be done.

    Note the OP also mentioned that they are filled with 6 drop-down lists:

    > 6 fields I want to post, drop downs in my a form are: provider, room, type of material, finish and custom.

    So you can create a table for each separate... but what I would probably do is store everything in a single table (depends of if you need to store additional information or if it's just a list of choice):

    optionsTbl

    Category ID value

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

    1 provider abc

    2 vendor xyz

    3 living room

    4 dining

    Enter values using a set of multiple records in the query: Select value of optionsTbl category WHERE = 'suppplier. " Select the value optionsTbl category = "room"; etc.

    Then fill the drop-down lists by looping through each query in the recordset and use next_result() to perform a loop on the next game.

  • Prob with DW list/Menu, PHP and mySQL

    I created a generic form with 7 text fields and 2 fields of list/menu. The information contained in my text fields is correctly sent to table/database mySQL, but this isn't the information of list/menu. Any ideas what it can be.

    Here is my form:

    < do action = "insert.php" method = "post" > "
    < p > first name:
    < input type = "text" name = "first" >
    < br >
    First name:
    < input type = "text" name = "last" >
    < br >
    Phone:
    < input type = "text" name = 'phone' >
    < br >
    Mobile:
    < input type = "text" name = "mobile" >
    < br >
    Fax:
    < input type = "text" name = "fax" >
    < br >
    E-mail:
    < input type = "text" name = "email" >
    < br >
    Web:
    < input type = "text" name = "web" >
    < br >
    < label >
    < select name = "acmod" size = "1" id = "acmod" >
    model < option selected = "selected" > < / option >
    < option > EMB135/145 < / option >
    < / select >
    < / label > < here >
    < /p >
    < p > < here >
    < select name = 'legs' size = '1' id = 'legs' >
    Legs of < option > < / option >
    < option > 1 < / option >
    < option > 2 < / option >
    < option > 3 < / option >
    < option > 4 < / option >
    < option > 5 < / option >
    < / select > < / p >
    < p >
    < input type = "Submit" >
    < /p >
    < / make >

    Here is my script PHP "insert.php".

    <?
    $username = "dbo233024213";
    $password = "Ja9DTJDW";
    $database = "db233024213";

    $first = $_POST ["first"];
    $dernière = $_POST ["last"];
    $phone = $_POST ['phone'];
    $mobile = $_POST ['mobile'];
    $fax = $_POST ['fax'];
    $email = $_POST ['email'];
    $web = $_POST ['web'];
    $acmod = $_POST ['acmod'];
    $legs = $_POST ['legs'];

    mysql_connect ("db1359.perfora.net", $username, $Password);
    @mysql_select_db ($database) or die ("unable to select database");

    $query = "INSERT INTO contacts VALUES (",' $premier$ ',' last ', '$phone', '$mobile', '$fax', '$email', '$web', 'acmod', 'legs') ";
    mysql_query ($Query);

    mysql_close();
    ? >



    Found my mistake. Post it here quickly made me see the error in my INSERT INTO query.

  • How to use QSettings and TextField/TextArea with persistence stores a string?

    I'm trying to store a string of data that the user enters in a TextField or TextArea.  I want this channel to be persistent in memory whenever the user opens the application.

    The Startshi sample application shows how this is done, but not with text in a TextField/TextArea.

    The sample application shows:

    Checkbox {}
    ID: uranuscanner
    text: "URANUS SCANNER.
    objectName: "uranuscanner."
    checked: _starshipApp.getValueFor (objectName, 'yes')
    onCheckedChanged: {}
    _starshipApp.saveValueFor (uranuscanner.objectName, verified)
    }
    }

    Data is retrieved with the bold line.  Are there no property equivalent qml who does the same thing for a TextField/TextArea?

    Thanks in advance,
    Ross

    It's easy

    I do it this way:

    TextField {
        id: server
        text: odssettings.getValueFor("server/url","")
        hintText: qsTr("Server URL") + Retranslate.onLanguageChanged
        inputMode: TextFieldInputMode.Url
        textStyle {
            base: SystemDefaults.TextStyles.BodyText
        }
        onTextChanged: {
            odssettings.saveValueFor("server/url",server.text)
        }
    }
    
  • I have a list of selection with the value yes and no

    I am 10 select list with the value yes or no

    I need to launch a dynamic action, and so I have a variable that indicates the number of selection selected list which has been chosen as Yes or no...

    How can I realize this is apex 4.2 db 11g...

    Thank you

    Published by: zycoz100 on March 4, 2013 12:05

    Brute force method:

    Dynamic Action using a PL/SQL block with something like:

    count := 0;
    Begin
    If :P1_Select_List_1 = 'yes'
      count := count + 1;
    End If;
    If :P1_Select_List_2 = 'yes'
      count := count + 1;
    End If;
    If :P1_Select_List_3 = 'yes'
      count := count + 1;
    End If;
    . . .
    End; 
    

    ???
    Howard

  • Default or initial value to the choice of the Message drop-down list

    Hello

    How to set the initial value to choose list (Message choice drop-down) based on the State of certain? in R12.1.3.

    setValue do not work, please help.


    IF cust_function = "NH" then set message of choice initial value items has another b (on A, b, c, d...) in extended CO.

    Thank you

    Hello

    for the dropdown list use this

    class oracle.apps.fnd.framework.webui.beans.OAWebBeanPickList

    Get your list of choices

    Use these functions to set initial values based on the State.

    setDefaultValue (String defaultValue)
    setSelectionValue (pageContext OAPageContext, String selectionValue)
    Set selection - internal value of the element of choice that will be shown as selected.

    Kind regards
    Pradeep

  • How to build a list or a table with fixed values?

    Is it possible to create a list or a table with fixed values, but with a variable length?

    for example:

    var columns = "name, age, function;

    var insertParams = generateList ( listLen (columns), ',','.) » ); *

    fact: insertParams = ',?,??


    * (this function does not exist. This is just to illustrate what I need)

    I know that this feature is easily created by creating a loop, but I was wondering if it was possible with a single line of code.

    Thank you

    If he can generate a table in the same way, which would be as well.

    Our messages have clashed. But I think that repeatString() would do the trick. You could cut the rear comma with left() or convert it to a table. By default, ListToArray() will silently ignore the trailing comma.

  • Value list is not to accept with the item values

    Hello

    I have a problem with a value list that really gets me excited.

    History: Re: selection for the week in the year and month numbers

    Here the LOV who works in PL/SQL dev. and APEX:
    Select to_char (dt + (7 * rn), 'IW') | » ('||
    TO_CHAR (DT + (decode (RN, 0, 0,(7*RN) + 1-offset))) | » -'||
    -case when dt + (7 *(rn+1)) - offset > last_day (dt) then
    LAST_DAY (DT) |') '
    on the other
    DT+ (7 *(RN+1)) - offset |') '
    end as show_value,
    TO_CHAR (DT + (7 * RN), 'IW') as return_value
    from (select to_date ('8,2008', 'Mr. YYYY') as double dt)
    , (select to_number (to_char (to_date ('8,2008', 'Mr. YYYY'), a ')) as double compensation)
    , (select rownum-1 rn of the double connection by rownum < = 5)
    When trunc (dt + (7 * rn), 'MM') = dt
    result:
    'SHOW_VALUE '; "' RETURN_VALUE '.
    "31" (01.08.08 - 03.08.08); "31"
    "32" (04.08.08 - 10.08.08); "32"
    "33" (11.08.08 - 17.08.08); "33"
    '34' (18.08.08 - 24.08.08); "34"
    '35' (25.08.08 - 31.08.08); "35"

    Apex I have two elements of value "08.2008" instead of the hard coded: P1_MONTH and: P1_YEAR. SQL looks like:
    select to_char (dt + (7 * rn), 'IW') | » ('||
    TO_CHAR (DT + (decode (RN, 0, 0,(7*RN) + 1-offset))) | » -'||
    -case when dt + (7 *(rn+1)) - offset > last_day (dt) then
    LAST_DAY (DT) |') '
    on the other
    DT+ (7 *(RN+1)) - offset |') '
    end as show_value,
    TO_CHAR (DT + (7 * RN), 'IW') as return_value
    from (select to_date(:P1_MONTH ||) '.' || ((: P1_YEAR, 'Mr. YYYY') as double dt)
    (select to_number (to_char (to_date(:P1_MONTH ||) '.' || ((((: P1_YEAR, 'Mr. YYYY'), a ')) as double compensation)
    , (select rownum-1 rn of the double connection by rownum < = 5)
    When trunc (dt + (7 * rn), 'MM') = dt
    I tried several ways, but it always seems to:
    LOV query is not valid, a display and a return value is needed, the column names must be different. If your query contains a query online, the first CLAUSE in the SQL statement must not belong to the query online.
    I HATE THIS MESSAGE!

    Other ways:
    (select to_date ((:P1_MONTH ||)) ' || (((: P1_YEAR), 'Mr. YYYY') as double dt)
    (select to_date (TO_CHAR(:P1_MONTH) |)) '.' || (TO_CHAR(:P1_YEAR), 'Mr. YYYY') as double dt)
    ...

    Is there someone who could help me with this specific issue of the APEX?

    Tobias

    Hello

    I don't know why, but if you remove the '.' in dates (IE, just having MMYYYY format), then this market - I just tested this on a model page. I don't have the data for selection lists, so have been using a normal text field, but it does not work: http://htmldb.oracle.com/pls/otn/f?p=45958:22

    Andy

  • PasswordEditField with no label and no initial value

    I have a custom password field (PasswordEditField extension) and I wonder what would be the correct values to pass to the first two arguments of the constructor to get no labels and no initial value, but still be able to set the style bit.  Should they be "null" or just an empty string ("").  For example:

    public final class PasswordField extends PasswordEditField {
    
        private static final int MAX_CHARS = 255;
    
        public PasswordField(long style) {
            super(null, null, MAX_CHARS, style);
            // ...or...
            super("", "", MAX_CHARS, style);
        }
    
    }
    

    The two seem to work the same, I was wondering which is more appropriate.  Don't see anything in the documentation to pass null.

    empty string

  • Problem with the Value property node (MacOS)

    Insofar that I tested it, the nodes of property Value (and value (signalling)) do not work under MacOS: value property is a Boolean value, the value (signaling) as a cluster (width, height).

    Even with the Boolean controls, the node does not work.

    Not such a problem in LV 8.6.

    Am I missing something? Is that some 'of use' ? Or just a bug?

    This looks like some sort of problem of indexing with the nodes property as somesort of corrupted installation.  What happens if you just delete the property node and recreate him?

    I filed a digital control and looked at the context menu of the list of the nodes property.  Below value and value (signs) are Visible (which would be a Boolean value) and Xcontrol, that when you bring through the submenus, the first choice is container bounds, a cluster of Width and Height.  If these 2 types of data which are located 2 below in the list match those you found.

    What happens if you take another node in property a few elements upwards or downwards in the context menu?  Fact is happen for other properties, and if so, are thereany properties who agree?

    Here's what look like my property for a digital nodes and I draggged the box up and down to show the natural order of the nodes property.  Notice that I have script installed, so there are a few other nodes property (and the blue box at the top) you may not have.

    PS. Verify you the signature.  Kudos button is now moved to the left since the update of the forum.

  • How can I put more than one detail in a select list/menu?

    Hi guys! If someone could help me with this problem, I have would be great!

    I'm putting more than one dynamic field on a line in a list/menu select for example... HomeTeam, AwayTeam, Kick Off Date v (mainValue)

    The code of the selection list is below.

    < select name = 'test' id = 'test' >

    <? PHP

    {}

    ? >

    < option value = "<?" PHP echo $row_fixtures ["HomeTeam"]? ' > ' > <? PHP echo $row_fixtures ["HomeTeam"]? > < / option >

    <? PHP

    } While ($row_fixtures = mysql_fetch_assoc ($fixtures));

    $rows = mysql_num_rows ($fixtures);

    If ($rows > 0) {}

    mysql_data_seek ($fixtures, 0);

    $row_fixtures = mysql_fetch_assoc ($fixtures);

    }

    ? >

    < / select >

    You have the values in the same record?

    Please present the structure of the database.

    normally the select option would look like

  • Filter a column with the value of another

    Hello. Hope someone can help with this... On my search page, I want to use the value of the first list/drop-down menu to filter the values of the second list/menu. I use PHP and DW 8.0.2.

    Example: The first column has each of the 50 States. second column has 3 000 counties. If a user selects New Jersey, I want to just 21 NJ counties to appear as options in the second menu downwards rather than 3 000 counties.

    First Recordset works very well for the States. But in my second recordset, I say 'select distinct County of the said County WHERE AS var1'... and var1 is $recordset1 [County]. But the 2 column is empty. How can I actively pass the value of the first column in the second while the user is still on the same page?

    Sandman

    >>
    Assuming that your table has a field named "State":
    «select County of States WHERE state = "var1""
    >>

    You can use this solution when the first menu page 1 and the second menu on page 2 (IE passing the value of a query on page 2), but as assumingly, you need to have this functionality within a single page, basic need based on a javascript solution 'drop-down menus of dynamic load' to load the menu2 - options "in situs.

    There is an extension for Dreamweaver stand alone for this on the site of Tecnorama , that also wants to work without the relationships between the tables, in other words, with the data in a table, which matches your scenario.

  • AppleScript - extraire extract values from a table, create a text file with these values

    Hello world

    Lets say I have a table that looks a bit like this

    And this table I would create 2 text files (or even more, depending on how many switchnames are there) who look a bit like these

    Is it still possible?

    I suppose to create a Service (which can be called in numbers) with Automator which includes an Applescript script - but - no idea since the script is not one of my strong suits.

    There is not need to be perfect, because tables are not necessarily the model presented above - so to tweek the script to the application will be necessary. The text files can be created/saved in the same folder as the file numbers is in.

    Y at - it script-genius out there?

    See you soon

    Florian

    Select the column of fist of the data, and then run this script by copying the Forum and paste it into the script editor.  The files will appear on the desktop

    say application "Numbers".

    say front document to tell the worksheet active

    say ( class is worn) fromfirst table whose selection range

    selectionRange defined in column 1 of the selection

    set cnt to 0

    the value destRange for range

    the value currentList to {}

    -the list of switches

    Repeat with acellule in selectionRange cells

    -say acellule to set the value on the NTC

    pass the value to the value of cell

    if and ((cnt > 0) (switch is not missing value) and (currentList is not contain switch)) then

    switch and the value in the currentList currentList

    end if

    NTC put to the cnt + 1

    end Repeat

    -Display dialog box "to the list of items is:" & currentList & "a list" & (currentList County) ".

    Repeat with aswitch in currentList

    " game textOut to '# Script generated with Applescript for switch' & aswitch &"

    # on "& (today's date) &"

    !

    conf t

    "

    set cnt to 0

    Repeat with acellule in selectionRange cells

    -say acellule to set the value on the NTC

    pass the value to the value of cell

    -Display dialog "aswitch is []" & aswitch & "] and switch is []" & switch & "]".

    if (aswitch contains the switch) then

    the value cellCol to address a column of first cell of acellule

    address of line of first cell value cellRow in of acellule

    value to the aport (value of the cell of the column (cellCol + 1) cellRow) integer

    the value vlan for the (value of the cell cellRow of column (cellCol + 2)) integer

    the value desc to the (value of the cell cellRow of column (cellCol + 3))

    " put to textOut textOut &.

    !

    "" IG 1/0 interface / "& aport &.

    switchport mode access

    switchport access vlan "" & vlan & ""

    Description LINK TO "" & desc & ""

    "

    on the other

    -Display dialog box "did not: []" & aswitch & "] and []" & switch & "]".

    end if

    NTC put to the cnt + 1

    end Repeat

    Set myFile to open for access (path to the Office as text) & aswitch & '_output.txt' the with write permission

    textOut write to myFile

    MyFile close access

    end Repeat

    end say

    end say

    end say

Maybe you are looking for

  • How can I 'Cancel' an email that I've put in the right folder?

    Sometimes, I hit the wrong file when you try to drop an e of my Inbox by using the drop-down sequential fall. There is no function 'Cancel' as if I was at Netscape. Sometimes in the search to work, not always. Thanks for any help you can give!

  • Menu, Nav, bookmarks and toolbars are not displayed.

    Here is a screenshot of Firefox on my computer - http://i.imgur.com/meaTv.jpg http://i.imgur.com/meaTv.jpg http://i.imgur.com/meaTv.jpg everything up. No bookmarks bar, navigation, toolbars, the bar nothing. I tried customize the layout and after tha

  • On-board memory is "N/A" NI Max

    Just installed PCIE 1433 and when I open OR MAX, "The on-board memory" this 1433 shows "n/a". Shouldn't be 512 MB on 1433? Attached is the screenshot. Thank you!

  • BlackBerry smartphones can not send emails

    Hey people, All over suddenly I can't send email through my bb device. Also, can not open attachments - get a message error "request may contain information finished book, service not found. Any ideas? Thank you Yar

  • Contact Information lost blackBerry smartphones

    I was updating my device software using the desktop software.  He was trying to restore information on my device, when it crashed.  I had chosen to back up my data at the beginning of the process, but a backup file has not been created.  Data it reco