Trying to dynamically output form fields returns URL values

Hello,
If there is a better way to go about this (which is quite likely), please let me know how to go about it.
I'm working on some code that is supposed to dynamically set the form variables as regular variables so that we can be lazy and not have to refer to the variable with form.somevariable name.
That part works perfectly.  Until I start testing for URL conflicts in which a URL variable has the same name.  For instance. . .
I have a form that passes two variables; FirstName and LastName.  If I hit the page, the form shows up, I input a first and last name and click submit.  The code works perfectly.
However, if I have URL variables with the same names, the code reports the url variable values instead of the form values.
Some sample values;
url.FirstName = Joe
url.LastName = Black
form.FirstName = Steve
form.LastName = White
My code that exposes the form variable will correctly find the form field names, but then when I 'evaluate' the value of the given form field, it will return the value of the URL variable of the same name rather than the form variable.
What I am really wanting (as I described briefly up above) is to have code that automatically converts client, URL and Form variables into 'regular variables' so that you don't have to write lots of extra code grabbing them later on.  Frameworks like CFWHEELS and ColdBox do this by default, but at the company I work out, we aren't using any of them.  I need it to expose the URL variables, but give presidence to form variables if they have the same name, because they are likely to be intended to do an update or such.
The code follows  Feel free to ignore the code for the URL and client variables if you wish as they don't directly affect how the form code works, I have tested with them commented out and I get the same result.  I provided all of it to give a more complete idea of what I have been toying with so far.  Please note that I don't normally use 'evaluate'.  There is probably a better way to go, but I don't know what it is.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<!--- Create a form so that we can post some form variables --->
<form action="" method="post">
    First Name <input type="text" name="FirstName" />
    Last Name <input type="text" name="lastName" />
    <input type="submit" />
</form>
<!--- Set a variable to hold the list of URL variable names --->
<cfset paramsurl = structKeyList(url)>
<cfoutput>
<br />
URL variables:
<!--- Loop through the list of url variables and then dynamically set a new variable to be equal to whatever is held by it --->
    <cfloop index="i" list="#paramsurl#">
        <cfset myDynVar = Evaluate(i)>
        <!--- Let's output the dynamically created variable as a test --->
        #i# = #myDynVar#<br />
    </cfloop>
</cfoutput>
<!--- If form fields exist --->
<cfif isdefined("Form.FieldNames")>
    <cfoutput>
        <b>Field Names:</b> #Form.FieldNames#
        <p>
            <b>Field Values:</b><br>
            <cfloop INDEX="TheField" list="#Form.FieldNames#">
                #TheField# = #Evaluate(TheField)#<br>
                <cfset TheField = Evaluate(TheField)>
            </cfloop>
        </p>
        Lets try and output the two form fields without using the "form." notation<br>
        FirstName : #FirstName# <br />
        LastName : #LastName#
    </cfoutput>
</cfif>
<br />
The client variables currently available are:<br />
<cfoutput>
    <cfset nVarCounter = 1>
    <cfloop list="#GetClientVariablesList()#" index="whichClientVar">
        #whichClientVar# : #client[whichClientVar]#<br />
        <cfset whichClientVar = Evaluate(whichClientVar)>
    </cfloop>
</cfoutput>

Try this:
<cfset structAppend( FORM, {
          'alpha' = 'bravo',
          'charlie' = 'delta',
          'echo' = 'foxtrot'
}, true ) />
<cfset structAppend( URL, {
          'alpha' = 'zulu',
          'lima' = 'mike',
          'echo' = 'papa'
}, true ) />
<!--- List the scopes in ascending order of importance. --->
<cfdump var="#FORM#" label="FORM scope" />
<cfdump var="#URL#" label="URL scope" />
<cfset scopes = "url,form">
<cfloop list="#scopes#" index="i">
          <cfloop list="#structKeyList( evaluate( i ) )#" index="j">
                    <cfset structInsert( VARIABLES, j, evaluate( i & '["' & j & '"]' ), true ) />
          </cfloop>
</cfloop>
<cfdump var="#VARIABLES#" abort="1" label="Combined Variables Scope" />
What I did is insert 3 key/value pairs into the FORM and URL scope.  I then dumped the scopes to show their structure and values.  Then I defined a variable (scopes) which is a list of the least important scope to the most important.  After that, the loop I do simply goes through the SCOPES, their exisiting key/values and sets them into the VARIABLES scope.  Then, when it moves to the next scope of importance, it simply puts their value into the variables scope as well (overriding in the event it already exists), thus, the scopes defined later in the list override and replace.
Then I just dump the VARIABLES scope (you'll notice it has the I, J and SCOPES variables in there that I used to create the loop.  If you perform this action in a function, simple make the I, J and SCOPES variables part of the LOCAL scope so they won't be in your VARIABLES scope.

Similar Messages

  • Validate Dynamically Generated Form Fields

    Hello, I am having difficulty in validating some text boxes I dynamically generated using javascript.
    I have done the below which is not working..... giving errors of undefined or is null
    var i=rowNum;//value of the integer giving the form field a unique name
    var thefield =(eval(document.getElementById('xxxx_'+i).value));
    if (thefield =="")
    alert("xxxxxxxxxxxxx");
    This is not working. Any one has example of validating dynamically generated form fields?

    Check out jquery and the validation plug-in by Jörn Zaefferer: http://plugins.jquery.com/project/validate
    It'll simplify your life!

  • How we create dynamic add form field in web form

    How we create dynamic add form field in web form?

    Hi,
    Thanks for reply.
    I need to create a form in which "add more" input field dynamically. For
    example sometime we need field on or more. Please look at the demo, I need
    to create form as per demo in business catalyst:
    http://www.openjs.com/scripts/examples/addfield.php

  • Is it possible to dynamically create form fields in PDF form?

    Hi all,
    I would like to dynamically create object like textbox, dropdown list from xml data. For example:
    When I receive following xml data:
    <field name="Check Box" type="selectbox"/>
    <field name="Text Field" type="textbox"/>
    I want to generate 2 form fields check box and text field with title "Check Box" and "Text Field" accordingly.
    Is it possible to do it in javascript for PDF form?
    Thank you and regards,
    Anh

    You cannot dynamically create objects on the fly like that but you can create interpret the XML and create an XDP file (which is the language of the template file) then bring that into Designer and create a PDF from that.
    Paul

  • Dynamic/Flowable Form Fields

    I am working on a basic form called Performance Evaluation. It consist of  6 different tables. The original form was designed in Word 2003 and convert to PDF using LiveCycle Designer ES. My questions is, my form fields continue to "fall off the page" when the text fields are completed with data. I am also having a hard time combining the tables that have been "placed" on page 2 during the conversation of .doc to pdf. I can not seem to make all of the table work together much less flow together to complete the dynamic, interactive form I would love to have. I want everyone to be able to write as much as they want in the comments section and keep everything together and not create blank pages..
    I have attached the form so everyone can take a look. ANY HELP would be greatly appreciated. . I can make text field flowable, and have them flow to a second page for simple forms/applications. It is when I add table that the Hierarchy becomes a problem.
    Any help would be greatly appreciated!  Jenn

    Thanks for the response. Yes, I have started a new form and not locating the flowable text fields into tables, but into their own individual cells.
    I have made the subforms  flow., and now they are continuing on the second page and not running off the page. However, I do have another question...(every solution sometimes creates another problem)  Now that my text field-data is flowing to the second page, the text itself is moving from the right hand column to the left hand column on the next page. This really does not bother me that much, but I have a feeling it will confuse everyone using the interactive pdf.  Any suggestions?
    Thanks - Jenn

  • Dynamically Update Form Fields

    I have a form with a dropdown where I can select an employee id. After it's selected I want to go to the database, get the corresponding information, and update the form fields. What is the best way to accomplish this?
    Thanks,
    Mark

    What kind of form you have a tabular form or a normal form?
    what version of apex you are using?
    if its a tabular form then you have to use ajax to fetch the values from database.
    if its a normal form then in apex 4.0 and above you can use dynamic actions for fetching the values.
    in older version you have to write a fetch process (before/after header) where you can fetch
    the associated values and assign them to respective items
    Thanks
    Tauceef

  • Form Field Appear on Value Entered

    I am running Coldfusion 9 and building a website using Dreamweaver from CS5.
    Is there a way to make a form field appear only if a certain value was entered into the previous form field? If so how? For example I am creating a registration page and one of the form fields is "Property Type" where the user can choose from "Residential, Commercial, Other" from a drop down menu and if the user chooses "Commercial" I want an additional field to pop up for the user to enter a value in "Company Name"??? Thanks for your help

    WolfShade,
    My apologizes for posting this question in the wrong forum. Since I have already started the discussion here I will ask you my question here still. I put in the lines of code you suggested however when I go to the drop down list and select "Commercial" no text input box appears for the Company Name field. If you have a min I will post my code below. Your help is very much appreciated. I should let you know I also tried adding the on change to the actual option tag for commerical i.e <option onChange...>Commercial</option> and still did not appear. I put the work area in red text hope it helps.
    <cfif IsDefined("FORM.username")>
      <cfquery name="MM_search" datasource="Access">
        SELECT Logininfo.Username FROM Logininfo WHERE Logininfo.Username=<cfqueryparam value="#FORM.username#" cfsqltype="cf_sql_clob" maxlength="50">
      </cfquery>
      <cfif MM_search.RecordCount GTE 1>
        <cflocation url="taken.cfm?requsername=#FORM.username#" addtoken="no">
      </cfif>
    </cfif>
    <cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
    <cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "customer">
      <cfif IsDefined('form.propertytype') and len(form.propertytype) NEQ 0>
      <cfset #CustomerTypeRefFullName#=form.propertytype/>
      </cfif>
      <cfif IsDefined('form.companyname') and len(form.companyname) NEQ 0>
      <cfset #CompanyName#=form.companyname/>
      </cfif>
      <cfif IsDefined('form.salutation') and len(form.salutation) NEQ 0>
      <cfset #Salutation#=form.salutation/>
      </cfif>
      <cfif IsDefined('form.firstname') and len(form.firstname) NEQ 0>
    <cfset #FirstName#=form.firstname/>
      </cfif>
        <cfif IsDefined('form.lastname') and len(form.lastname) NEQ 0>
        <cfset #LastName#=form.lastname/>
        </cfif>
      <cfset Name=#FirstName#&''&#LastName#/>
      <cfset BillAddressAddr1=#Salutation#&' '&#FirstName#&''&#LastName#/>
        <cfif IsDefined('form.streetaddress') and len(form.streetaddress) NEQ 0>
        <cfset #BillAddressAddr2#=form.streetaddress/>
      </cfif>
        <cfif IsDefined('form.city') and len(form.city) NEQ 0>
        <cfset #BillAddressCity#=form.city/>
        </cfif>
        <cfif IsDefined('form.state') and len(form.state) NEQ 0>
        <cfset #BillAddressState#=form.state/>
        </cfif>
      <cfif IsDefined('form.zipcode') and len(form.zipcode) NEQ 0>
        <cfset #BillAddressPostalCode#=form.zipcode/>
        </cfif>
    <cfset Contact=#FirstName#&''&#LastName#/>
      <cfif IsDefined('form.dayphone') and len(form.dayphone) NEQ 0>
        <cfset #Phone#=form.dayphone/>
      </cfif>
      <cfif IsDefined('form.eveningphone') and len(form.eveningphone) NEQ 0>
        <cfset #AltPhone#=form.eveningphone/>
      </cfif>
      <cfif IsDefined('form.email') and len(form.email) NEQ 0>
        <cfset #Email#=form.email/>
      </cfif>
    <cfquery datasource="QBs">  
        INSERT INTO Customer (CustomerTypeRefFullName, CompanyName, Salutation, FirstName, LastName, Name, BillAddressAddr1, BillAddressAddr2, BillAddressCity, BillAddressState, BillAddressPostalCode, Contact, Phone, AltPhone, Email)
    VALUES (
    <cfqueryparam value="#CustomerTypeRefFullName#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
    <cfqueryparam value="#CompanyName#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
    <cfqueryparam value="#Salutation#" cfsqltype="cf_sql_varchar" maxlength="15"/>,
    <cfqueryparam value="#FirstName#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
    <cfqueryparam value="#LastName#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
    <cfqueryparam value="#Name#" cfsqltype="cf_sql_varchar" maxlength="50"/>,
    <cfqueryparam value="#BillAddressAddr1#" cfsqltype="cf_sql_varchar" maxlength="50"/>,
    <cfqueryparam value="#BillAddressAddr2#" cfsqltype="cf_sql_varchar" maxlength="50"/>,
    <cfqueryparam value="#BillAddressCity#" cfsqltype="cf_sql_varchar" maxlength="50"/>,
    <cfqueryparam value="#BillAddressState#" cfsqltype="cf_sql_varchar" maxlength="25"/>,
    <cfqueryparam value="#BillAddressPostalCode#" cfsqltype="cf_sql_varchar" maxlength="13"/>,
    <cfqueryparam value="#Contact#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
    <cfqueryparam value="#Phone#" cfsqltype="cf_sql_varchar" maxlength="15"/>,
    <cfqueryparam value="#AltPhone#" cfsqltype="cf_sql_varchar" maxlength="15"/>,
    <cfqueryparam value="#Email#" cfsqltype="cf_sql_carchar" maxlength="75"/>
      </cfquery>
    <cfif IsDefined('form.firstname') and len(form.firstname) NEQ 0>
    <cfset #FirstName#=form.firstname/>
    </cfif>
    <cfif IsDefined('form.lastname') and len(form.lastname) NEQ 0>
    <cfset #LastName#=form.lastname/>
    </cfif>
    <cfif IsDefined('form.username') and len(form.username) NEQ 0>
    <cfset #Username#=form.username/>
    </cfif>
    <cfif IsDefined('form.password') and len(form.password) NEQ 0>
    <cfset #Password#=form.password/>
    </cfif>
    <cfquery datasource="Access">
    INSERT INTO Logininfo (FirstName, LastName, Username, Password)
    VALUES (
    <cfqueryparam value="#FirstName#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
    <cfqueryparam value="#LastName#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
    <cfqueryparam value="#Username#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
    <cfqueryparam value="#Password#" cfsqltype="cf_sql_varchar" maxlength="41"/>
    </cfquery>
      <cflocation url="login.cfm">
    </cfif>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html><!-- InstanceBegin template="/Templates/Main.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <!-- InstanceBeginEditable name="title" -->
    <title>TS Landscaping LLC</title>
    <!-- InstanceEndEditable -->
    <link href="styles/Main.css" rel="stylesheet" type="text/css">
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
    <!-- InstanceBeginEditable name="head" -->
    <script type="text/javascript">function showHideInput(ddValue,txtFld) {
      if(toLowerCase(ddValue) == "commercial") {
         txtFld.style.display = '';
      else {
         txtFld.style.display = 'none';
         txtFld.value = '';
    </script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationConfirm.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css">
    <link href="SpryAssets/SpryValidationConfirm.css" rel="stylesheet" type="text/css">
    <!-- InstanceEndEditable --></head>
    <body>
    <div id="Container">
      <div id="header"><img src="Images/Website-Image.gif" width="393" height="217" alt="TS Landscaping Logo and Name of company"></div>
      <div id="menu_bar1">
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a class="MenuBarItemSubmenu" href="index.html">Home</a>
            <ul>
              <li><a href="#">Item 1.1</a></li>
              <li><a href="#">Item 1.2</a></li>
              <li><a href="#">Item 1.3</a></li>
            </ul>
          </li>
          <li><a href="about_us.html">About Us</a></li>
          <li><a href="#">Services</a></li>
          <li><a class="MenuBarItemSubmenu" href="#">User Account</a>
            <ul>
              <li><a href="login.cfm">Login</a></li>
              <li><a href="registration_page.cfm">Register</a></li>
              <li><a href="members_page.cfm">Customer Page</a></li>
            </ul>
          </li>
          <li><a href="contact_us.html">Contact Us</a></li>
        </ul>
      </div>
      <div id="Main">
        <div id="side_bar"><!-- InstanceBeginEditable name="sidebar" -->Content for  id "side_bar" Goes Here<!-- InstanceEndEditable --></div>
        <div id="main_body"><!-- InstanceBeginEditable name="mainbody" -->
    <h1>Welcome to our sign up Page!</h1>
    <p>Please fill out the form below to register with out site and gain access to our members account page.</p>
    <form name="customer" action="<cfoutput>#CurrentPage#</cfoutput>" method="POST" id="customer"><table width="auto" border="0" align="center">
      <tr>
    <td><label for="propertytype">
      <div align="right">Property Type:</div>
    </label></td>
        <td><select onChange="showHideInput(this.options[this.selectedIndex].value,'companyname');" name="propertytype" id="propertytype" accesskey="n" tabindex="02">
          <option selected>Residential</option>
          <option >Commercial</option>
          <option>Other</option>
        </select></td>
      </tr>
      <tr>
      <td><label for="companyname">
        <div align="right">Company Name:</div>
      </label></td>
        <td><span id="sprytextfield11">
          <input type="text" name="companyname" id="companyname" accesskey="n" tabindex="03" style="display:none;">
    </span></td>
       </tr>
      <tr>
        <td><label for="salutation">
          <div align="right">Salutation:
            </label>
          </div></td>
        <td><select name="salutation" id="salutation" accesskey="n" tabindex="04">
          <option selected>Mr.</option>
          <option>Mrs.</option>
          <option>Ms.</option>
        </select></td>
      </tr>
      <tr>
        <td><label for="firstname">
          <div align="right">First Name:
            </label>
          </div></td>
        <td><span id="sprytextfield1">
          <input type="text" name="firstname" id="firstname" accesskey="n" tabindex="05" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="lastname">
          <div align="right">Last Name:
            </label>
          </div></td>
        <td><span id="sprytextfield2">
          <input type="text" name="lastname" id="lastname" accesskey="n" tabindex="10" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="streetaddress">
          <div align="right">Street Address
            </label>
          </div></td>
        <td><span id="sprytextfield3">
          <input type="text" name="streetaddress" id="streetaddress" accesskey="n" tabindex="15" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="city">
          <div align="right">City:
            </label>
          </div></td>
        <td><span id="sprytextfield4">
          <input type="text" name="city" id="city" accesskey="n" tabindex="20" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="state">
          <div align="right">State:
            </label>
          </div></td>
        <td><span id="sprytextfield5">
          <input type="text" name="state" id="state" accesskey="n" tabindex="25" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="zipcode">
          <div align="right">Zipcode:
            </label>
          </div></td>
        <td><span id="sprytextfield6">
          <input type="text" name="zipcode" id="zipcode" accesskey="n" tabindex="30" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
        <tr>
        <td><label for="dayphone">
          <div align="right">Day Phone:</div>
        </label></td>
        <td><span id="sprytextfield8">
          <input type="text" name="dayphone" id="dayphone" accesskey="n" tabindex="31">
    </span></td>
        </tr>
          <tr>
        <td><label for="eveningphone">
          <div align="right">Evening Phone:</div>
        </label></td>
        <td><span id="sprytextfield9">
          <input type="text" name="eveningphone" id="eveningphone" accesskey="n" tabindex="32">
    </span></td>
        </tr>
          <tr>
        <td><label for="email">
          <div align="right">Email:</div>
        </label></td>
        <td><span id="sprytextfield10">
          <input type="text" name="email" id="email" accesskey="n" tabindex="33">
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
        </tr>
      <tr>
        <td><label for="username">
          <div align="right">Username:
            </label>
          </div></td>
        <td><span id="sprytextfield7">
          <input type="text" name="username" id="username" accesskey="n" tabindex="40" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="password">
          <div align="right">Password:
            </label>
          </div></td>
        <td><span id="sprypassword1">
          <input type="password" name="password" id="password" accesskey="n" tabindex="45" />
          <span class="passwordRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="passwordconfirm">
          <div align="right">Confirm Password
            </label>
          </div></td>
        <td><span id="spryconfirm1">
          <input type="password" name="passwordconfirm" id="passwordconfirm" accesskey="n" tabindex="50">
          <span class="confirmRequiredMsg">A value is required.</span><span class="confirmInvalidMsg">The values don't match.</span></span></td>
      </tr>
      <tr>
        <td colspan="2"><div align="center">
          <input type="submit" name="submit" id="submit" value="Register" accesskey="n" tabindex="50" />
        </div></td>
        </tr>
    </table>
      <input type="hidden" name="MM_InsertRecord" value="customer" />
    </form>
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4");
    var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
    var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6");
    var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7");
    var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1");
    var spryconfirm1 = new Spry.Widget.ValidationConfirm("spryconfirm1", "password");
    var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8", "none", {isRequired:false});
    var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9", "none", {isRequired:false});
    var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10");
    var sprytextfield11 = new Spry.Widget.ValidationTextField("sprytextfield11", "none", {isRequired:false});
    </script><!-- InstanceEndEditable --></div>
      </div>
      <div id="footer">
        <p>Home | About Us | Site Map </p>
        <p>&copy; TS Landscaping LLC 2010</p>
      </div>
    </div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
        </script>
    </body>
    <!-- InstanceEnd --></html>

  • FormsCentral - design form : Initialize form field with default value

    Hello,
              My customer asks me to initialize text fields with default values. Example , Name , email , phone number etc to be displayed by default till it is overwritten by values entered. Could you please guide me how to achieve this ?
    Many Thanks,
    Sree

    Hi,
    see Re: sequencing problem-Forms
    Regards Michael

  • Dynamic output & input fields in the table control

    HI Guys,
    How can one change the attribute of  input field to output field basically greying of field) dynamically
    based on the some flag. Loop at screen does not work. I need to change the attributes
    of field 'outfiled' and output field display only'.
    Any help is highly appreciated.
    Regards,
    Harsha

    Hi Harsha,
    I generated a table control (ERP 6.2) and somewhere I found the coding like this (the name of the table control is TABLE_CONTROL):
    *&spwizard: output module for tc 'TABLE_CONTROL'. do not change this lin
    *&spwizard: get lines of tablecontrol
    module TABLE_CONTROL_get_lines output.
      g_TABLE_CONTROL_lines = sy-loopc.
    If I do a loop at the screen at this place, I can control the individual input/output for the screen fields (the table fields). In my work area (WA_CONTROL) I can see the actual value of fields. Depending on this, I choose to enable/disable input via:
    loop at screen.
    if wa_control-material <> ' '.
    screen-input = '0'.
    modify screen.
    endif.
    endloop.

  • Forms field returning date but not time

    Hello everyone, I currently have a field in my database to store a certain date and time. However the corresponding field in my forms builder only seems to display the date and not the time. Does anyone have any idea why this is occuring?
    Thank you.

    also check if you have set a format mask. if so, make sure that time format is included.

  • How to populate a hidden form field with a value passed from another page

    I'm using PHP/MySQL and DW CS4.
    I am trying to obtain the external key for a table, and include it as a hidden field in a form for a second table.
    The user selects a "need" from a list and is taken to a new page which displays the need selected in the prior page and a form the user can fill out with details of his offer, there should also be a hidden field in this form that contains the index to the needs table, this hidden field holds the external key. Most of the code is working, except for populating the hidden field with the external key. I have proven(by printing it to the screen) that I have obtained the external key and stored it in a variable ($saveNeedId) . What I'm unable to do is assign this variable to the hidden field in the form I'm about to store in a table. Sometimes I get zero and sometimes I get the index to the first need in the table. This ought to be simple but I can't get it to work, I must be missing something obvious - still very new to PHP.
    Here's the code that sets up the variable and prints it to the screen for test purposes
          $saveNeedId = "-1";
              if (isset($_GET['needId'])) {
                $saveNeedId = $_GET['needId'];
                print $saveNeedId;
    Here's the code that sets up the hidden fields in the form, the one I'm trying to set up is the first one, needId
         <input type="hidden" name="needId" value="<?php echo $row_rsNeedsUnmet['needId']; ?>" />
         <input type="hidden" name="offerId" value="" />
         <input type="hidden" name="MM_insert" value="form1" />
    The page where the user sees the list of needs is here www.hollisterairshow.com/weneed.php
    I'd really appreciate sone help with this, I've tried all combinations of double quotes, percent signs and nothing works...sigh.
    Tony

    Here's the code that sets up the variable and prints it to the screen for test purposes
          $saveNeedId = "-1";
              if (isset($_GET['needId'])) {
                $saveNeedId = $_GET['needId'];
                print $saveNeedId;
    Here's the code that sets up the hidden fields in the form, the one I'm trying to set up is the first one, needId
         <input type="hidden" name="needId" value="<?php echo $row_rsNeedsUnmet['needId']; ?>" />
         <input type="hidden" name="offerId" value="" />
         <input type="hidden" name="MM_insert" value="form1" />
    <input type="hidden" name="needId" value="<?php echo $_GET['needId']; ?>" />
    I looked at your page. It looks like you figured it out.

  • Few Projectproperty and Listproperty fields returning empty values (CrossListQueryInfo)

    I am running a CrossListQueryInfo and the ViewFields for the CAML includes
    <ProjectProperty Name="Title"/>
    <ProjectProperty Name="Url"/>
    <ListProperty Name="Title"/>
    <ListProperty Name="DefaultViewUrl"/>
    I am getting empty values for Url and DefaultViewUrl, although it is returning Titles correctly. Is this some limitation or I am missing something?

    I Feel I have to say this... Just a thought: have you received legal
    advice on whether the "data sent by email is not secure" disclaimer
    would hold up? I'd recommand also checking with your merchant account
    provider. Your form could be argued as leading the user into
    irresponsible use of their card.
    Aandi Inston

  • SELECT MAX(field) / SELECT MIN(field) return wrong values

    Hi,
    I have the query:
    Select 
        MAX(b1.time_s) as time_s 
    From
        BUSINESS_INVOCATIONS b1 
    Where
        b1.time_s >= 1219217034000 
        AND  b1.rec_sess_id = 2197756621378027521 
        AND  b1.comp_id IN  ( Select id  From J2EE_CONFIGURATION_BEAN  Where j2eeApplicationsTableId = 378302371920347137 )
    This return the MAX value of the comp_id and not the MAX value of the b1.time_s
    looks like there is a BUG in MAXDB when i have a join of two tables the MAX/MIN functions works on the wrong fields!
    If i change the query to be:
    Select 
        max(b1.time_s) as time_s 
    From
        BUSINESS_INVOCATIONS b1,
        J2EE_CONFIGURATION_BEAN jcb
    Where
        b1.time_s >= 1219217034000 
        AND  b1.rec_sess_id = 2197756621378027521
        AND jcb.j2eeApplicationsTableId = 378302371920347137
        AND  b1.comp_id = jcb.id
    The MIN/MAX functions works good and return the right value
    Pleasehelp me to find what is the problem and if any one already have a solution.
    Thanks,
    Yosef

    Dta for BUSINESS_INVOCATIONS tabel:
    ID,CLASS_TYPE,M_TIME,FUNCTIONENTRYID,TOP_PARENT,START_TIME,TIME_S,COMP_ID,REC_SESS_ID,PARENT,HTTP_SESSION,INVOCATION_HASH_CODE,MINOR_INVOCATION,TRANSACTION_ID,USER_TRACING_COOKIE,TRACINGTYPE
    2089670230321135617,H,1219738865499,1387108688451338241,2089670230321135617,1219217053734,1219217053734,414331168939311111,2197756621378027521,(null),2179742222868545537,-1238173181,GET,null,null,-1
    2089670230321135618,H,1219738865499,1387108688451338242,2089670230321135618,1219217071156,1219217071156,414331168939311108,2197756621378027521,(null),2179742222868545538,-628203986,GET,null,null,-1
    2089670230321135619,H,1219738865499,1387108688451338279,2089670230321135619,1219217073531,1219217073531,414331168939311112,2197756621378027521,(null),2179742222868545538,545948335,GET,null,null,-1
    2089670230321135620,H,1219738865499,1387108688451338284,2089670230321135620,1219217075671,1219217075671,414331168939311119,2197756621378027521,(null),2179742222868545538,1958406838,GET,null,null,-1
    2089670230321135621,H,1219738865499,1387108688451338289,2089670230321135621,1219217077359,1219217077359,414331168939311106,2197756621378027521,(null),2179742222868545538,-2089005650,GET,null,null,-1
    2089670230321135622,H,1219738865499,1387108688451338292,2089670230321135622,1219218442312,1219218442312,414331168939311115,2197756621378027521,(null),2179742222868545538,-1298180580,GET,null,null,-1
    2089670230321135623,H,1219738865499,1387108688451338297,2089670230321135623,1219218467765,1219218467765,414331168939311107,2197756621378027521,(null),2179742222868545538,1318337921,GET,null,null,-1
    2107684628830617601,E,1219738865515,1387108688451338244,2089670230321135618,1219217071171,1219217071171,324259176391901185,2197756621378027521,2089670230321135618,2179742222868545538,586868856,(null),(null),(null),-1
    2107684628830617602,E,1219738865515,1387108688451338281,2089670230321135619,1219217073531,1219217073531,324259176391901185,2197756621378027521,2089670230321135619,2179742222868545538,1886325459,(null),(null),(null),-1
    2107684628830617603,E,1219738865515,1387108688451338286,2089670230321135620,1219217075671,1219217075671,324259176391901185,2197756621378027521,2089670230321135620,2179742222868545538,-550916224,(null),(null),(null),-1
    2107684628830617604,E,1219738865515,1387108688451338291,2089670230321135621,1219217077359,1219217077359,324259176391901185,2197756621378027521,2089670230321135621,2179742222868545538,1676270392,(null),(null),(null),-1
    2107684628830617605,E,1219738865515,1387108688451338294,2089670230321135622,1219218442312,1219218442312,324259176391901185,2197756621378027521,2089670230321135622,2179742222868545538,-2074647744,(null),(null),(null),-1
    2107684628830617606,E,1219738865515,1387108688451338299,2089670230321135623,1219218467765,1219218467765,324259176391901185,2197756621378027521,2089670230321135623,2179742222868545538,63795915,(null),(null),(null),-1
    3278620531946946561,T,1219738865483,1387108688451338291,2089670230321135621,1219217077359,1219217077359,2828260569209896968,2197756621378027521,2107684628830617604,2179742222868545538,-1511714853,java.lang.ArithmeticException,(null),(null),18
    Daa for J2EE_CONFIGURATION_BEAN Table:
    select * from IDENTIFY.J2EE_CONFIGURATION_BEAN
    ID,J2EEAPPLICATIONSTABLEID,J2EEAPPLICATIONID,J2EECOMPONENTID
    180144094616485889,0,0,0
    180144094616485890,0,0,0
    180144094616485891,0,0,0
    180144094616485892,0,0,0
    180144094616485893,378302478220787713,0,0
    180144094616485894,0,0,0
    306244884182859777,378302478220787713,360288079711305731,306244884182859777
    324259282692341761,378302478220787713,360288079711305731,306244884182859777
    360288079711305729,378302478220787713,360288079711305729,0
    360288079711305730,378302478220787713,360288079711305730,0
    360288079711305731,378302478220787713,360288079711305731,0
    360288079711305732,378302478220787713,360288079711305732,0
    360288079711305733,378302478220787713,360288079711305733,0
    360288079711305734,378302478220787713,360288079711305734,0
    414331275239751681,378302478220787713,360288079711305731,594475260334571522
    414331275239751682,378302478220787713,360288079711305731,594475260334571522
    414331275239751683,378302478220787713,360288079711305731,594475260334571522
    414331275239751684,378302478220787713,360288079711305731,594475260334571522
    414331275239751685,378302478220787713,360288079711305731,594475260334571522
    414331275239751686,378302478220787713,360288079711305731,594475260334571522
    414331275239751687,378302478220787713,360288079711305731,594475260334571522
    414331275239751688,378302478220787713,360288079711305731,594475260334571522
    414331275239751689,378302478220787713,360288079711305731,594475260334571522
    414331275239751690,378302478220787713,360288079711305731,594475260334571522
    414331275239751691,378302478220787713,360288079711305731,594475260334571522
    414331275239751692,378302478220787713,360288079711305731,594475260334571522
    414331275239751693,378302478220787713,360288079711305731,594475260334571522
    414331275239751694,378302478220787713,360288079711305731,594475260334571522
    414331275239751695,378302478220787713,360288079711305731,594475260334571522
    540432064806125569,378302478220787713,360288079711305732,594475260334571523
    540432064806125570,378302478220787713,360288079711305732,594475260334571523
    540432064806125571,378302478220787713,360288079711305732,594475260334571523
    540432064806125572,378302478220787713,360288079711305732,594475260334571523
    540432064806125573,378302478220787713,360288079711305732,594475260334571523
    540432064806125574,378302478220787713,360288079711305732,594475260334571523
    540432064806125575,378302478220787713,360288079711305734,594475260334571524
    540432064806125576,378302478220787713,360288079711305734,594475260334571524
    576460861825089537,378302478220787713,360288079711305730,576460861825089537
    576460861825089538,378302478220787713,360288079711305731,576460861825089538
    576460861825089539,378302478220787713,360288079711305732,576460861825089539
    576460861825089540,378302478220787713,360288079711305733,576460861825089540
    576460861825089541,378302478220787713,360288079711305734,576460861825089541
    594475260334571521,378302478220787713,360288079711305729,594475260334571521
    594475260334571522,378302478220787713,360288079711305731,594475260334571522
    594475260334571523,378302478220787713,360288079711305732,594475260334571523
    594475260334571524,378302478220787713,360288079711305734,594475260334571524
    2810246277000855553,378302478220787713,360288079711305729,2810246277000855553
    2810246277000855554,378302478220787713,360288079711305729,2810246277000855554
    2810246277000855555,378302478220787713,360288079711305729,2810246277000855555
    2810246277000855556,378302478220787713,360288079711305729,2810246277000855556
    2810246277000855557,378302478220787713,360288079711305729,2810246277000855557
    2810246277000855558,378302478220787713,360288079711305729,2810246277000855558
    2810246277000855559,378302478220787713,360288079711305729,2810246277000855559
    2828260675510337537,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337538,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337539,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337540,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337541,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337542,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337543,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337544,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337545,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337546,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337547,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337548,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337549,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337550,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337551,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337552,378302478220787713,360288079711305729,2846275074019819521
    2846275074019819521,378302478220787713,360288079711305729,2846275074019819521
    3152519848681013249,378302478220787713,360288079711305729,3152519848681013249
    3152519848681013250,378302478220787713,360288079711305730,3152519848681013250
    3152519848681013251,378302478220787713,360288079711305731,3152519848681013251
    3152519848681013252,378302478220787713,360288079711305732,3152519848681013252
    3152519848681013253,378302478220787713,360288079711305733,3152519848681013253
    3152519848681013254,378302478220787713,360288079711305734,3152519848681013254
    3170534138742571009,0,0,0
    3170534138742571010,0,0,0
    3170534247190495233,0,0,0
    3170534247190495234,0,0,0
    3602879811418062849,378302478220787713,360288079711305729,594475260334571521
    Hope this will help:)
    Thanks,
    Yosef

  • Need a Dynamic SQL statgement that returns multiple values.

    Hi,
    I'm using Oracle 10.1.0.5.
    In an anonymous block I have a dynamic SQL statement that finds the table name and column name that a string value resides in.
    It looks like this:
          l_sql := 'SELECT 1 FROM dual WHERE exists (SELECT 1 FROM '||
                   r.owner||'.'||r.table_name||' WHERE '||r.column_name||
                   ' = :b1)';
             EXECUTE IMMEDIATE l_sql INTO l_res USING l_contents;
             DBMS_OUTPUT.Put_Line(l_contents||' exists in '||r_owner||
                                  r.table_name||'.'||r.column_name);I'd then like to do a 'Select Distinct' to list all the other values in that column in the anonymous block,
    preferably as another dynamic SQL statement.
    How can I do this?

    user10382685 wrote:
    Hi,
    I'm using Oracle 10.1.0.5.
    In an anonymous block I have a dynamic SQL statement that finds the table name and column name that a string value resides in.
    It looks like this:
    l_sql := 'SELECT 1 FROM dual WHERE exists (SELECT 1 FROM '||
    r.owner||'.'||r.table_name||' WHERE '||r.column_name||
    ' = :b1)';
    EXECUTE IMMEDIATE l_sql INTO l_res USING l_contents;
    DBMS_OUTPUT.Put_Line(l_contents||' exists in '||r_owner||
    r.table_name||'.'||r.column_name);I'd then like to do a 'Select Distinct' to list all the other values in that column in the anonymous block,
    preferably as another dynamic SQL statement.
    How can I do this?Well, it would be nice for you to post the whole context of your present solution so we know what's going on. I'll assume r comes from a loop referencing user_tab_cols or some equivalent view.
    If so, you'll likely need to check the DATA_TYPE column.
    Keeping in mind, doing something like this is going to be pretty ridiculous if you have a large amount of distinct values ... I'm hoping/assuming this is a one off type of thing.
    declare
      type        l_date is table of date;
      v_date      l_date;
      type        l_char is table of varchar2(4000);
      v_char      l_char;
      type        l_numb is table of number;
      v_numb      l_numb;
      l_distinct_ set sys_refcursor;
    begin
      <current_code>
      open l_distinct_set for 'select distinct ' || r.column_name || ' from ' || r.owner||'.'||r.table_name;
      --expand on the data types you care about as needed, this is a BASIC set
      if r.data_type = 'DATE'
      then 
        fetch l_distinct_set bulk collect into v_date;
        <process_collection_as_wanted>
      elsif r.data_type in ('VARCHAR2', 'CHAR')
      then
        fetch l_distinct_set bulk collect into v_char;
        <process_collection_as_wanted>
      elsif r.data_type = 'NUMBER'
      then
        fetch l_distinct_set bulk collect into v_numb;
        <process_collection_as_wanted>
      end if;
      close l_distinct_set;

  • Dynamic SQL: how to return a value

    Hi all
    I am going to construct statement which will be running some select statement and I need to return value, in this case just 1 value, into the program.
    I know I can insert this value in a table and later select it from there.
    Is there any way to avoid creation of table?
    Thank you, Gene.

    Did you mean you are going for PL/SQL. If so,
    Declare a variable of appropriate data type (It would be best to declare it as the same as the column data type you are pulling in a SELECT Statement)
    If your select statement returns one row for that record you can use something like:
    SELECT your_column INTO the_variable_declared
    FROM your_table
    ....Hope this helps,
    Regards,
    Jo

Maybe you are looking for

  • Java Application [Java Bundler]: how I can use an image? Which path?

    Hi, how I can use an image in my Java Application when I create the jar bundle with Jar Bundler? Which is the path of the file? I don't know if I got it across...

  • Trying to understand the SJAS package-appclient utility.

    Hi, I have a few questions about the package-appclient script. I have no problem getting it to work, but there are a few things that don't make sense to me. I want to use a professional looking installer (I grabbed a demo of install4j and really like

  • "Create PDF from Web Page" Yields Authorization Failure

    Acrobat 9 Pro Extended running on Windows XP Service Pack 3: When using "Create PDF from Web Page," certain linked pages result in an "Authorization Failure" error message. Is there any way to instruct Acrobat to disregard pages that are not download

  • W530 Boot Failure with out any BSOD

    I bought my thinkpad w530 in Oct. 2012. It works perfect until recent month. At the beginning, it can't wake up in the sleep mode. If I connect the AC power, it reset the BIOS time. And nowadays, when i power off this laptop, it can't boot. And I rem

  • CS4 Creative Suite update re install

    I have Creative Suite cs4. It is an upgrade as I had CS3 as well. I installed CS4 onto my PC and all went well. My PC then packed up and I had to buy a new one. I went to install CS4 onto my new PC but had lost the serial number for CS3 which is need