Array in Forms

Hi all
What is the problem in this code
declare
type temp is record (invoice_num inv_detail.invoice_num%type);
type temp5 is table of temp index by binary_integer;
temp6 temp5;
idx integer := 0;
begin
     go_block('inv_search');
     first_record;
     loop
     temp6(idx) := :inv_search.inv_code;
     next_record;
     idx := idx + 1;
     exit when :system.last_record = 'TRUE' ;
     end loop;
     temp6(idx) := :inv_search.inv_code;
end;
compile error "expression is wrong type"
Thanks
Selvam

temp6 is a array of RECORDS. You cannot move a single item value to a record. It will work if you change both lines where you say  temp6(idx) := :inv_search.inv_code;to  temp6(idx).invoice_num := :inv_search.inv_code;However, there is no need to create a record with a single column in it. You could more easily create an array of just the single column. I have changed your code around to illustrate, and changed the order of steps here:
declare
  type invoice_num_TblTyp is table of inv_detail.invoice_num%type
                             index by binary_integer;
  invoice_num_Tbl invoice_num_TblTyp;
  idx integer;
begin
  go_block('inv_search');
  first_record;
  invoice_num_Tbl.delete;
  loop
    exit when :system.record_status = 'NEW';
    idx := :system.cursor_record;
    invoice_num_Tbl(idx) := :inv_search.inv_code;
    exit when :system.last_record = 'TRUE' ;
    next_record;
  end loop;
  first_record;
  Message('Invoice_Num_Tbl contains '
           ||nvl(invoice_num_Tbl.Last,0)||' records.');
end;

Similar Messages

  • Using arrays in forms

    Hi All!
    Anybody know how to use Arrays in Forms 6?
    Best regards.

    Hello,
    have you tried collections ?
    Declare
       TYPE  TYP_NUM_ARRAY IS TABLE OF NUMBER INDEX BY BINARY_INTEGER ;
       mytab TYP_NUM_ARRAY ;
    Begin
       For i IN 1..10 Loop
          mytab(i) := i ;
       End loop ;
    End ;Francois

  • Use of multi-dimensional arrays in forms - forms debugger crash

    Hello All readers,
    have an issue with use of multi-dimensional arrays in forms when debugging and/or calling another form post array-population.
    USING VERSIONS: oracle forms 9.0.4, Jinitiator 1.3.1.17, oracle db 10.1
    the following code snippet works from a when-button-pressed trigger when called without the debugger. when called with the debugger it crashes when any element of the multi-dimensional associative array is accessed/populated/read. In addition, if i populate the multi-dimensional array then call a form (a msgbox form to display the arrays content as a string) it crashes too.
    declare
    type datasource_rec is record (field varchar2(32), val varchar2(3999));
    type datasource_arr is table of datasource_rec index by binary_integer;
    type datasource_arr_arr is table of datasource_arr index by binary_integer;
         l_arr datasource_arr_arr;
         procedure poparr(i_arr out datasource_arr_arr) is
              idx binary_integer := 1;
              iidx binary_integer := 1;
         begin
              while (idx <= 10) loop
                   iidx := 1;
                   while (iidx <= 10) loop     
                        i_arr(idx)(iidx).field := 'field'||to_char(iidx)||':'||to_char(idx); --# debugger crashes here with JVM aborting... message (which crashes forms builder too)
    i_arr(idx)(iidx).val := 'test value';
                   iidx := iidx+1;     
                   end loop;
              idx := idx+1;
              end loop;
         end;
         procedure printarr is
              idx binary_integer := l_arr.first;
              iidx binary_integer;
              l_msg varchar2(4000);
              l_response pls_integer;
         begin
              while (idx is NOT null) loop
                   iidx := l_arr(idx).first;
                   while (iidx is NOT null) loop
                        l_msg := l_msg||chr(10)||l_arr(iidx)(idx).field||' = '||l_arr(iidx)(idx).val;
                   iidx := l_arr(idx).next(iidx);
                   end loop;
              idx := l_arr.next(idx);
              end loop;
              alerts.info('see console for full printout: '||chr(10)||l_msg);
    --l_response := msgbox.show(l_msg); --calls another modal form to display a long message, which crashes the runtime with a java console message*
         r$debug.print(l_msg);
         end;
    begin
         poparr(l_arr);
         printarr;
    end;
    The java console does not print anything useful when both forms builder and the runtime crash/hangs as a result of the debugger being attached (except displaying a "JVM aborting" message) but when the runtime alone crashes as a result of calling another form after popping the MD array it prints:
    oracle.forms.net.ConnectionException: Forms session <28> aborted: unable to communicate with runtime process.
         at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
         at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
         at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
         at oracle.forms.net.HTTPNStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at oracle.forms.net.StreamMessageWriter.run(Unknown Source)
    has anyone else encountered this problem and found a solution/workaround? is their some sort of memory limitation for forms-side handling of (multi-dimensional) arrays?+
    many thanks
    ps: i get similar problems when a) populating the array from a server/db-side packaged procedure (crashes with java console message as above even when not debugging) b) using server/db-side packaged types for the array.

    Hello All readers,
    have an issue with use of multi-dimensional arrays in forms when debugging and/or calling another form post array-population.
    USING VERSIONS: oracle forms 9.0.4, Jinitiator 1.3.1.17, oracle db 10.1
    the following code snippet works from a when-button-pressed trigger when called without the debugger. when called with the debugger it crashes when any element of the multi-dimensional associative array is accessed/populated/read. In addition, if i populate the multi-dimensional array then call a form (a msgbox form to display the arrays content as a string) it crashes too.
    declare
    type datasource_rec is record (field varchar2(32), val varchar2(3999));
    type datasource_arr is table of datasource_rec index by binary_integer;
    type datasource_arr_arr is table of datasource_arr index by binary_integer;
         l_arr datasource_arr_arr;
         procedure poparr(i_arr out datasource_arr_arr) is
              idx binary_integer := 1;
              iidx binary_integer := 1;
         begin
              while (idx <= 10) loop
                   iidx := 1;
                   while (iidx <= 10) loop     
                        i_arr(idx)(iidx).field := 'field'||to_char(iidx)||':'||to_char(idx); --# debugger crashes here with JVM aborting... message (which crashes forms builder too)
    i_arr(idx)(iidx).val := 'test value';
                   iidx := iidx+1;     
                   end loop;
              idx := idx+1;
              end loop;
         end;
         procedure printarr is
              idx binary_integer := l_arr.first;
              iidx binary_integer;
              l_msg varchar2(4000);
              l_response pls_integer;
         begin
              while (idx is NOT null) loop
                   iidx := l_arr(idx).first;
                   while (iidx is NOT null) loop
                        l_msg := l_msg||chr(10)||l_arr(iidx)(idx).field||' = '||l_arr(iidx)(idx).val;
                   iidx := l_arr(idx).next(iidx);
                   end loop;
              idx := l_arr.next(idx);
              end loop;
              alerts.info('see console for full printout: '||chr(10)||l_msg);
    --l_response := msgbox.show(l_msg); --calls another modal form to display a long message, which crashes the runtime with a java console message*
         r$debug.print(l_msg);
         end;
    begin
         poparr(l_arr);
         printarr;
    end;
    The java console does not print anything useful when both forms builder and the runtime crash/hangs as a result of the debugger being attached (except displaying a "JVM aborting" message) but when the runtime alone crashes as a result of calling another form after popping the MD array it prints:
    oracle.forms.net.ConnectionException: Forms session <28> aborted: unable to communicate with runtime process.
         at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
         at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
         at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
         at oracle.forms.net.HTTPNStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at oracle.forms.net.StreamMessageWriter.run(Unknown Source)
    has anyone else encountered this problem and found a solution/workaround? is their some sort of memory limitation for forms-side handling of (multi-dimensional) arrays?+
    many thanks
    ps: i get similar problems when a) populating the array from a server/db-side packaged procedure (crashes with java console message as above even when not debugging) b) using server/db-side packaged types for the array.

  • Passing array betwwen forms

    hey,
    i want to know how passing an array between to forms,use the Call_Form() built-in with the SHARE_LIBRARY_DATA parameter?
    if you know that ,give me some examples.
    thanks.

    Hello,
    Parameter type can only be number, char or date.
    To pass more complex constructions, use a database package or a Forms package stored in a PLL, then use the Call_Form() built-in with the SHARE_LIBRARY_DATA parameter.
    Francois

  • Sending arrays from Forms to Oracle PL/SQL

    Hi All,
    I'm stuck up in an urgent requirement where I want to send an array of values(eg., PL/SQL table) with a number of rows say 100 from Forms 6i to Oracle PL/SQL. PL/SQL table is based on a record type consists of a number of columns say 10.
    The actual scenario is that, Forms interactive screen (multiple record block) does validations on the values entered by users and then it should send all the rows together to a Stored Procedure or Packaged procedure. Packaged procedure receives the PL/SQL table, does processing on the data values of the PL/SQL table and send it back to Forms 6i.
    Please help me in getting the solution on this urgent problem. There is a flexibility of using any kind of arrays, it can be PL/SQL, Nested table or varrays.
    Thanks.

    hi,
    I want to give n-array elements from a forms6i application to
    a stored package at the same time. I want to work with n-array
    elements in my stored package >>mypackage<<, because I want to sort the
    array elements in a stored package. Now >>mypackage<< works only with
    one array-element, but I need n-elements. First I start a test with
    a procedure and a package.
    -- Later >>element<< should be a program unit in Forms6i
    CREATE OR REPLACE PROCEDURE element IS
    TYPE tab_spoolfile IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;
    t_file     tab_spoolfile;
    BEGIN
    t_file(1):= 'abc_00017_cba'; -- 1.
    t_file(2):= 'xyz_00002_zyx'; -- 2.
    t_file(3):= 'efg_99999_gfe'; -- 3.
    t_file(4):= 'mno_00115_onm'; -- 4.
    t_file(5):= 'hij_00088_jih'; -- 5.
    FOR i IN t_file.FIRST..t_file.LAST
    LOOP
    out('Element: '||t_file(i));
    mypackage.my_procedure(mypackage.tab_array(t_file(i)),null);
    END LOOP;
    END;
    CREATE OR REPLACE PACKAGE MyPackage AS
    TYPE tab_array IS TABLE OF VARCHAR2(300);
    t_file tab_array;
    PROCEDURE my_procedure(in_values IN tab_array, p_param VARCHAR2);
    END MyPackage;
    CREATE OR REPLACE PACKAGE BODY MyPackage AS
    i BINARY_INTEGER:= 1;
    PROCEDURE my_procedure(in_values IN tab_array, p_param VARCHAR2) IS
    BEGIN
    IF in_values.EXISTS(i)
    THEN
    out('Sort : '||in_values(i));
    END IF;
    END;
    END MyPackage;
    SQL> exec element
    Element: abc_00017_cba
    Sort : abc_00017_cba
    Element: xyz_00002_zyx
    Sort : xyz_00002_zyx
    Element: efg_99999_gfe
    Sort : efg_99999_gfe
    Element: mno_00115_onm
    Sort : mno_00115_onm
    Element: hij_00088_jih
    Sort : hij_00088_jih
    Does anybody have an idea?
    Best regards,
    Tom

  • Array serach form multiple entries

    A simple question - how do I search an array for muliple entries
    e.g. I have an array with 'firstName' 'lastName' and 'phoneNumber'
    fields, I want to search and return all elements with the same 'lastName'.
    Any help would be appreciated.

    hmmm - I suppose I thought the OP wanted a to get all duplicated entries, so the sort step was to group all equal entries together. I suppose if the OP were looking for a particular entry to get duplicates for then no need to sort, just iterate.
    Now that I think about it, if this were the case, you could make a Map with lastName as the keys and an ArrayList of entries as values and iterate over your list adding entries to the appropriate ArrayList in your Map. If you see what I mean.
    Lee

  • How can I make my Contact Form send info to my email?

    Greetings! I have below a contact form that i have creaed with some help but I can't seem to make it send the information to my email address after it is submitted. That is my most important issue right now.
    A secondary issue is, can I make it so once this form is submitted it send the info to my email without doing a page redirect?
    Thanks in advance!

    Ok what about this code located at www.ybcreations.com/ContactTest.php?
    <?php
    // Set email variables
    $email_to = '[email protected]';
    $email_subject = 'BestMarketingNames Inquiry';
    // Set required fields
    $required_fields = array('fullname','email','comment');
    // set error messages
    $error_messages = array(
              'fullname' => 'Please enter a Name to proceed.',
              'email' => 'Please enter a valid Email Address to continue.',
              'comment' => 'Please enter your Message to continue.'
    // Set form status
    $form_complete = FALSE;
    // configure validation array
    $validation = array();
    // check form submittal
    if(!empty($_POST)) {
              // Sanitise POST array
              foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value));
              // Loop into required fields and make sure they match our needs
              foreach($required_fields as $field) {
                        // the field has been submitted?
                        if(!array_key_exists($field, $_POST)) array_push($validation, $field);
                        // check there is information in the field?
                        if($_POST[$field] == '') array_push($validation, $field);
                        // validate the email address supplied
                        if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field);
              // basic validation result
              if(count($validation) == 0) {
                        // Prepare our content string
                        $email_content = 'New Website Comment: ' . "\n\n";
                        // simple email content
                        foreach($_POST as $key => $value) {
                                  if($key != 'submit') $email_content .= $key . ': ' . $value . "\n";
                        // if validation passed ok then send the email
                        mail($email_to, $email_subject, $email_content);
                        // Update form switch
                        $form_complete = TRUE;
    function validate_email_address($email = FALSE) {
              return (preg_match('/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i', $email))? TRUE : FALSE;
    function remove_email_injection($field = FALSE) {
       return (str_ireplace(array("\r", "\n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field));
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <!-- Contact Form Designed by James Brand @ dreamweavertutorial.co.uk -->
    <!-- Covered under creative commons license - http://dreamweavertutorial.co.uk/permissions/contact-form-permissions.htm -->
              <title>Contact Form</title>
              <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
              <link href="Billy testing/ContactForm.css" rel="stylesheet" type="text/css" />
              <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.0/mootools-yui-compressed.js"></script>
        <script type="text/javascript" src="Billy testing/validation/validation.js"></script>
              <script type="text/javascript">
    var nameError = '<?php echo $error_messages['fullname']; ?>';
                        var emailError = '<?php echo $error_messages['email']; ?>';
                        var commentError = '<?php echo $error_messages['comment']; ?>';
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
        </script>
    </head>
    <body onload="MM_preloadImages('Billy testing/x.png')">
    <div id="formWrap">
    <h2>We appreciate your business</h2>
    <div id="form">
    <?php if($form_complete === FALSE): ?>
    <form action="ContactTest.php" method="post" id="comments_form">
              <div class="row">
              <div class="label">Your Name</div> <!--end .label -->
              <div class="input">
              <input type="text" id="fullname" class="detail" name="fullname" value="<?php echo isset($_POST['fullname'])? $_POST['fullname'] : ''; ?>"/><?php if(in_array('fullname', $validation)): ?><span class="error"><?php echo $error_messages['fullname']; ?></span><?php endif; ?>
              </div><!-- end. input --><!-- end .context -->
              </div><!-- end .row -->
        <div class="row">
              <div class="label">Your Email Address</div> <!--end .label -->
              <div class="input">
              <input type="text" id="email" class="detail" name="email" value="<?php echo isset($_POST['email'])? $_POST['email'] : ''; ?>"/><?php if(in_array('email', $validation)): ?><span class="error"><?php echo $error_messages['email']; ?></span><?php endif; ?>
              </div><!-- end. input --><!-- end .context -->
              </div><!-- end .row -->
        <div class="row">
              <div class="label">Comments</div> <!--end .label -->
              <div class="input">
              <textarea id="comment" name="comment" class="mess"><?php echo isset($_POST['comment'])? $_POST['comment'] : ''; ?></textarea><?php if(in_array('comment', $validation)): ?><span class="error"><?php echo $error_messages['comment']; ?></span><?php endif; ?>
              </div><!-- end. input -->
              </div><!-- end .row -->
        <div class="submit">
        <input type="submit" id="submit" name="submit" value="Send Message" />
        </div><!-- end .submit-->
        </form>
         <?php else: ?>
    <p style="font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#255E67; margin-left:25px;">Thank you for your Message!</p>
    <script type="text/javascript">
    setTimeout('ourRedirect()', 5000)
    funtion ourRedirect(){
              location.href='contact.html'
    </script>
    <?php endif; ?>
    </div><!-- end #form-->
    </div>
    <p> </p>
    <!-- end formwrap -->
    </body>
    </html>

  • How can i send an auto reply with form content to sender?

    Hai!
    I'm new to website building, but i already came a long way
    i made a form and i like to send a auto reply with the form content (if that isnt too difficult) to the person who filled it in.
    The form i made is in PHP (coding i copied partly from someone from the internet .)
    You can see the from at: http://vinddit.nl/vindditnu%20php%20version.php
    My PHP coding so far
    <?php
    // Set email variables
    $email_to = '[email protected]';
    $email_subject = 'Aanvraag - VINDDIT NU!';
    // Set required fields
    $required_fields = array('Voornaam','email','Achternaam','Plaats');
    // set error messages
    $error_messages = array(
              'Voornaam' => 'Vul hier uw voornaam in a.u.b.',
              'email' => 'Vul hier een geldig email adres in a.u.b.',
              'Achternaam' => 'Vul hier uw achternaam in a.u.b.',
              'Plaats' => 'Vul hier uw woonplaats in a.u.b.'
    // Set form status
    $form_complete = FALSE;
    // configure validation array
    $validation = array();
    // check form submittal
    if(!empty($_POST)) {
              // Sanitise POST array
              foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value));
              // Loop into required fields and make sure they match our needs
              foreach($required_fields as $field) {
                        // the field has been submitted?
                        if(!array_key_exists($field, $_POST)) array_push($validation, $field);
                        // check there is information in the field?
                        if($_POST[$field] == '') array_push($validation, $field);
                        // validate the email address supplied
                        if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field);
              // basic validation result
              if(count($validation) == 0) {
                        // Prepare our content string
                        $email_content = 'New Website Comment: ' . "\n\n";
                        // simple email content
                        foreach($_POST as $key => $value) {
                                  if($key != 'submit') $email_content .= $key . ': ' . $value . "\n";
                        // if validation passed ok then send the email
                        mail($email_to, $email_subject, $email_content);
                        // Update form switch
                        $form_complete = TRUE;
    function validate_email_address($email = FALSE) {
              return (preg_match('/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i', $email))? TRUE : FALSE;
    function remove_email_injection($field = FALSE) {
       return (str_ireplace(array("\r", "\n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field));
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
              <title>Aanvraag formulier</title>
              <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
              <link href="style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.0/mootools-yui-compressed.js"></script>
        <script type="text/javascript" src="validation/validation.js"></script>
              <script type="text/javascript">
    var nameError = '<?php echo $error_messages['fullname']; ?>';
                        var emailError = '<?php echo $error_messages['email']; ?>';
                        var commentError = '<?php echo $error_messages['comment']; ?>';
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
        </script>
    <style type="text/css">
    </style>
    </head>
    <body onload="MM_preloadImages('icons/x.png')">
    <p> </p>
    <p>
      <?php if($form_complete === FALSE): ?>
    </p>
        <form action="vindditnu php version.php" method="post" enctype="application/x-www-form-urlencoded" name="Form"  id="commentsform">
        <h1><img src="icons/vinddit3.gif" width="220" height="80" alt="logo" /></h1>
        <h1>Wat zoekt u?:</h1>
                     <table width="690" border="0">
            <tr>
              <td>In welke categorie zoekt u?*</td>
              <td colspan="3"><select name="Ophalen_verzenden" id="Ophalen_verzenden">
                <option selected="selected">Meubels </option>
                <option>Witgoed </option>
                <option>Woon accesoires </option>
                <option>Kleding </option>
                <option>Schoenen </option>
                <option>Mode accesoires </option>
                <option>Speelgoed </option>
                <option>Boeken, tijdschriften, papierwaren </option>
                <option>Overig </option>
              </select></td>
            </tr>
            <tr>
              <td>Kleur:* </td>
              <td colspan="3"><select name="kleuren" id="kleuren">
                <option>Blauw</option>
                <option>Rood</option>
                <option>WIt</option>
                <option>Zwart</option>
                <option>Beige</option>
                <option>Bruin</option>
                <option>Geel</option>
                <option>Oranje</option>
                <option>Rood</option>
                <option>Metallic (Bijv. Zilver/Goud/Brons/Koper</option>
                <option>Meerkleurig</option>
                <option selected="selected">Overig/ N.v.t</option>
              </select></td>
            </tr>
            <tr>
              <td>Merk: </td>
              <td colspan="3"><input name="Merk" type="text" id="Merk5" value="<?php echo isset($_POST['Merk'])? $_POST['Merk'] : ''; ?>" />
                <?php if(in_array('Merk', $validation)): ?>
                <span class="error"><?php echo $error_messages['Merk']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Type/Model:</td>
              <td colspan="3"><input type="text" name="type" id="type" value="<?php echo isset($_POST['type'])? $_POST['type'] : ''; ?>" />
                <?php if(in_array('type', $validation)): ?>
                <span class="error"><?php echo $error_messages['type']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Materiaal: </td>
              <td colspan="3"><input name="Materiaal" type="text" id="Materiaal" value="<?php echo isset($_POST['Materiaal'])? $_POST['Materiaal'] : ''; ?>" />
                <?php if(in_array('Materiaal', $validation)): ?>
                <span class="error"><?php echo $error_messages['Materiaal']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Maat: </td>
              <td colspan="3"><input type="text" name="Maat" id="Maat" value="<?php echo isset($_POST['Maat'])? $_POST['Maat'] : ''; ?>" />
                <?php if(in_array('Maat', $validation)): ?>
                <span class="error"><?php echo $error_messages['Maat']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Conditie*:</td>
              <td colspan="3"><select name="conditie" id="conditie" >
                <option>Zo goed als nieuw</option>
                <option>Nieuw</option>
                <option>Bebruikt</option>
                <option selected="selected">Geen voorkeur </option>
              </select></td>
            </tr>
            <tr>
              <td>Ophalen/Verzenden:*</td>
              <td colspan="3"><select name="ophalen" id="ophalen">
                <option>Ophalen</option>
                <option>Verzenden</option>
                <option>N.v.t</option>
                <option>Geen voorkeur </option>
              </select></td>
            </tr>
            <tr>
              <td>Prijs Min:</td>
              <td><input name="prijsmin" type="text" id="prijsmin" size="10" value="<?php echo isset($_POST['prijsmin'])? $_POST['prijsmin'] : ''; ?>" />
                <?php if(in_array('prijsmin', $validation)): ?>
                <span class="error"><?php echo $error_messages['prijsmin']; ?></span>
                <?php endif; ?></td>
              <td>Prijs Max:</td>
              <td><input name="Prijs" type="text" id="Prijs" size="10" value="<?php echo isset($_POST['Prijs'])? $_POST['Prijs'] : ''; ?>" />
                <?php if(in_array('Prijs', $validation)): ?>
                <span class="error"><?php echo $error_messages['Prijs']; ?></span>
                <?php endif; ?></td>
            </tr>
          </table>
          <h1>Opmerkingen:</h1>
          <table width="690" border="0">
            <tr>
              <td height="25">Opmerkingen:</td>
              <td rowspan="2"><textarea name="Opmerkingen" cols="67" rows="10" id="Opmerkingen"><?php echo isset($_POST['Opmerkingen'])? $_POST['Opmerkingen'] : ''; ?></textarea>
                <?php if(in_array('Opmerkingen', $validation)): ?>
                <span class="error"><?php echo $error_messages['Opmerkingen']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td height="78"> </td>
            </tr>
          </table>
          <h1>Uw Gegevens:</h1>
          <table width="690" border="0">
            <tr>
              <td>Voornaam/Voorletters*:</td>
              <td><input type="text" name="Voornaam" id="Voornaam" class='invul' value="<?php echo isset($_POST['Voornaam'])? $_POST['Voornaam'] : ''; ?>" />
                <?php if(in_array('Voornaam', $validation)): ?>
                <span class="error"><?php echo $error_messages['Voornaam']; ?></span>
                <?php endif; ?></td>
              <td>Achternaam:* </td>
              <td><input type="text" name="Achternaam" id="Achternaam" class='invul' value="<?php echo isset($_POST['Achternaam'])? $_POST['Achternaam'] : ''; ?>" />
                <?php if(in_array('Achternaam', $validation)): ?>
                <span class="error"><?php echo $error_messages['Achternaam']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Straatnaam:</td>
              <td><input type="text" name="Straat" id="Straat" class='invul' value="<?php echo isset($_POST['Straat'])? $_POST['Straat'] : ''; ?>" />
                <?php if(in_array('Straat', $validation)): ?>
                <span class="error"><?php echo $error_messages['Straat']; ?></span>
                <?php endif; ?></td>
              <td>Huisnummer:</td>
              <td><input name="Huisnummer" type="text" id="Huisnummer" class='invul' size="10" value="<?php echo isset($_POST['Huisnummer'])? $_POST['Huisnummer'] : ''; ?>" />
                <?php if(in_array('Huisnummer', $validation)): ?>
                <span class="error"><?php echo $error_messages['Huisnummer']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Postcode:</td>
              <td><input type="text" name="Postcode" id="Postcode" class='invul' value="<?php echo isset($_POST['Postcode'])? $_POST['Postcode'] : ''; ?>" />
                <?php if(in_array('Postcode', $validation)): ?>
                <span class="error"><?php echo $error_messages['Postcode']; ?></span>
                <?php endif; ?></td>
              <td>Plaats:* </td>
              <td><input type="text" name="Plaats" id="Plaats" class='invul' value="<?php echo isset($_POST['Plaats'])? $_POST['Plaats'] : ''; ?>" />
                <?php if(in_array('Plaats', $validation)): ?>
                <span class="error"><?php echo $error_messages['Plaats']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Email Adres:*</td>
              <td colspan="3"><input type="text" name="email" id="email" class='invul' value="<?php echo isset($_POST['email'])? $_POST['email'] : ''; ?>" />
                <?php if(in_array('email', $validation)): ?>
                <span class="error"><?php echo $error_messages['email']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Telefoonnummer:</td>
              <td colspan="3"><input name="Telefoon" type="text" id="Telefoon" class='invul' value="<?php echo isset($_POST['Telefoon'])? $_POST['Telefoon'] : ''; ?>" />
                <?php if(in_array('Telefoon', $validation)): ?>
                <span class="error"><?php echo $error_messages['Telefoon']; ?></span>
                <?php endif; ?></td>
            </tr>
          </table>
          <p>
            <label for="Straat"></label>
            <label for="Huisnummer"><br />
            </label>
            <input type="submit" name="Submit" id="Submit" value="Verstuur" />
                   <input type="reset" name="Reset" id="Reset" value="Wissen" />
          </p>
        </form>
        <?php else: ?>
        <div class="bedankt">
          <p>Bedankt voor uw aanvraag!</p>
          <p>Wij zullen uw aanvraag zo spoedig mogelijk behandelen. Meestal duurt dit 2 a 3 werkdagen.</p>
          <p><img src="icons/vinddit3.gif" width="220" height="80" alt="logo" /></p>
    </div>
        <p>
          <script type='text/javascript'>
    setTimeout("ourRedirect()", 5000)
    function ourRedirect() {
          </script>
          <?php endif; ?>
    </body>
    </html>
    and .JS
    window.addEvent('domready', function() {
              // Get the form
              var form = $('comments_form');
              //  if the form is found...
              if (form) {
                        // obtain error fields
                        var name = $('fullname');
                        var email = $('email');
                        var comment = $('comment');
                        // Set the default status
                        var isValid = true;
                        // input error function for the error messages
                        var addError = function (field, msg) {
                                  field.addClass('error'); // Add error class to field
                                  var error = field.getParent().getElement('span') || new Element('span', {'class': 'error'}); // add error message if not already placed
                                  error.set('text', msg); // error text msg
                                  error.inject(field, 'after'); // Insert error message after field
      // detach error function used to delete any error messages and remove the error class
                        var removeError = function (field) {
                                  field.removeClass('error'); // Remove error class from form fields
                                  var error = field.getParent().getElement('span'); // find any existing error messages
      // destroy if error message
                                  if (error) {
                                            error.destroy();
    //  insert submit form event
                        form.addEvent('submit', function (e) {
                                  // Test name length
                                  if (name.get('value').length === 0) {
                                            isValid = false;
                                            addError(name, nameError);
                                  } else {
                                            isValid = true;
                                            removeError(name);
    // check email length
                                  if (email.get('value').length === 0) {
                                            isValid = false;
                                            addError(email, emailError);
                                  // check email validity
                                  } else if (!email.get('value').test(/^([a-zA-Z0-9\+_\-]+)(\.[a-zA-Z0-9\+_\-]+)*@([a-zA-Z0-9\-]+\.)+ [a-zA-Z]{2,6}$/)) {
                                            isValid = false;
                                            addError(email, emailError);
                                  } else {
                                            isValid = true;
                                            removeError(email);
                    // check comment length
                                  if (comment.get('value').length === 0) {
                                            isValid = false;
                                            addError(comment, commentError);
                                  } else {
                                            isValid = true;
                                            removeError(comment);
                                  // If form invalid then stop event happening
                                  if (!isValid) {
                                            e.stop();

    lisavs12686 wrote:
    Whould it also be possible to send the sender the submited data (looking like the filled in form or so)?
    not really nessecary but whould be a nice  jextra
    You can but you would need to send it as an html email which is much more complicated.
    What you would do is build a page/table construction like below. You would need to use the php variables to echo out the information in the <td></td> cells (example below).
    $reply = $_POST['email'];
    $from = '[email protected]';
    $replysubject = "Auto-Reply: Website Name";
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= "From: $from\r\nReply-to: $reply";
    $replymessage = '
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Comments from Website</title>
    </head>
    <body>
    <table>
    <tr>
    <td bgcolor="#ffffff" style="font-family: verdana, arial, helvetica, sans-serif; font-size: 13px; padding: 10px 15px;">Name: </strong>'.$name.'
    </td>
    </tr>
    </table>
    </body>
    </html>';
    mail($reply, $replysubject, $replymessage, $headers);

  • What is the recommended approach to create XML input for forms service

    Context:
        As part of our development project, we need to retrieve data (eg. Policy details) from different modules and using this data we need to generate PDF document using a particular template (what we have uploaded to live cycle)
    Solution we have tried:
    We have created Java classes from XSD (for a particular template) using JAXB complier. Using these Java classes we instantiated all the parameters using data from different modules and got XML after marshalling. We send this XML as a byte array to forms service to get PDF. No issues in this context.
    After displaying the PDF, under writer will modify some of the data and submit back to the application. Application again uses forms service to retrieve XML back as a byte array. This is where we had issues. We tried un-marshalling using same JAXB classes but we are loosing data for all the rich text fields.
    Can you please guide us to handle this issue ASAP, because we are completely stuck in the development stage. We really appreciate if some one can respond to this issue.
    Thank you
    Srini P

    Context:
        As part of our development project, we need to retrieve data (eg. Policy details) from different modules and using this data we need to generate PDF document using a particular template (what we have uploaded to live cycle)
    Solution we have tried:
    We have created Java classes from XSD (for a particular template) using JAXB complier. Using these Java classes we instantiated all the parameters using data from different modules and got XML after marshalling. We send this XML as a byte array to forms service to get PDF. No issues in this context.
    After displaying the PDF, under writer will modify some of the data and submit back to the application. Application again uses forms service to retrieve XML back as a byte array. This is where we had issues. We tried un-marshalling using same JAXB classes but we are loosing data for all the rich text fields.
    Can you please guide us to handle this issue ASAP, because we are completely stuck in the development stage. We really appreciate if some one can respond to this issue.
    Thank you
    Srini P

  • How to map an array to fixed fields using Biztalk mapper

    I need to remap an array of objects like this:
        <Root>
          <ListOfObjs>
            <Obj>
              <Attr1>0000</Attr1>
              <Attr2>Hello!</Attr2>
            </Obj>
            <Obj>
              <Attr1>1111</Attr1>
              <Attr2>Hello1!</Attr2>
            </Obj>
          </ListOfObjs>
        </Root>
    in an output like this:
            <Root>
                <Obj1_Attr1>0000</Obj1_Attr1>
                <Obj1_Attr2>Hello!</Obj1_Attr2>
                <Obj2_Attr1>1111</Obj2_Attr1>
                <Obj2_Attr2>Hello1!</Obj2_Attr2>
            </Root>
    So in my XSD schema I have something like this:
    Schema Input
                               <xs:element name="Root">
                                <xs:complexType>
                                 <xs:sequence>
                                  <xs:element name="ListOfObjs">
                                   <xs:complexType>
                                    <xs:sequence>
                                     <xs:element name="Obj">
                                      <xs:complexType>
                                       <xs:sequence>
                                        <xs:element name="Attr1">
                                         <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       <xs:element name="Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       </xs:sequence>
                                      </xs:complexType>
                                     </xs:element>
                                    </xs:sequence>
                                   </xs:complexType>
                                  </xs:element>
    Schema output
                                     <xs:element name="Root">
                                      <xs:complexType>
                                       <xs:sequence>
                                        <xs:element name="Obj1_Attr1">
                                         <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       <xs:element name="Obj1_Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                        <xs:element name="Obj2_Attr1">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                        <xs:element name="Obj2_Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       </xs:sequence>
                                      </xs:complexType>
                                     </xs:element>
    In addiction I have to evaluate every single value because when I found some conditions (like if value=0000 output should be NULL).
    What would be the best way to do it? I'm thinking to develop a custom functoid but I'm not sure it would be the best way, probably it could be done even using XSLT inline transforms, can you point me in the best direction?
    Thank you

    Hi,
    You cannot directly map an array output to any single field in BizTalk mapper.
    Couple of options :
    1) create
    the Xslt or inline C# code
    Refer: 
    http://seroter.wordpress.com/2008/10/07/splitting-delimited-values-in-biztalk-maps/
    2) Shankycheil has
    provided a solution to similar requirement in the below link, u can also refer that.
    https://social.msdn.microsoft.com/Forums/en-US/55ec472d-4f34-4057-b1c6-0e50740f0f6e/how-to-itterate-string-array-values-in-biztalk-mapper?forum=biztalkgeneral
    Rachit
    Thank you, I already seen both posts, but I'm not sure they are what I need or I can't understand well how to use them.
    Speaking about the first solution, as I told before, in the example I should have an array already formed and delimited by a char (something like "obj1attr1-obj1attr2-ob2attr1-obj2attr2". In this situation probably this example could be a good
    point to start from, but how to transform my complex input object in a similar formatted string?
    About the second I don't understand well what is the working solution that they have adopted. Is the 4 steps solution suggested by  Shankycheil? If yes, how can I loop between all array elements and extract all their values?

  • How to create an array - Please help

    Hello. I have been trying to build a dynamic menu. According to different user role, they would have different access options to use the form. Now, I need to create a dynamic menu to display the menu options according to their user role. Somebody told me I can use an array, but I am not sure how to achieve this, and how to display the menu to user. Please help me. Thank you.

    Hi
    Arrays in Form are implemented through Record Groups. However you can enable and disable a menu item throught database roles.
    For more infor please refer Oracle Documentation.
    HTH
    Arvind Balaraman
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by scsyim:
    Hello. I have been trying to build a dynamic menu. According to different user role, they would have different access options to use the form. Now, I need to create a dynamic menu to display the menu options according to their user role. Somebody told me I can use an array, but I am not sure how to achieve this, and how to display the menu to user. Please help me. Thank you.<HR></BLOCKQUOTE>
    null

  • Programmatically Change Array to Cluster Size

    Hello,
    I have a Chart with several values scrolling across it. The number of
    values is variable. To prepare the data for the Chart, I use the Array to
    Cluster element. Is there a way I can programmatically change the size of
    the cluster output?
    Thanks,
    Peter

    Peter,
    As far as I know, you cannot programatically chage the size of the cluster output in the Array to Cluster vi. However, you may not need to convert to a cluster for charting. The chart will take a 2D array and plot mutiple lines. See the attached example which uses Reshape Array to form the data for a chart.
    The only hitch is that it erases the plot when you change the number of values to plot. This may or may not be important to you.
    Tim
    Attachments:
    Reshape_array_for_chart.vi ‏18 KB

  • Accessing JPF scoped form

    Hi,
    Below is the requirement:
    Display the strings "one","two","three" as default values in a text boxes which
    are in a form /jsp. The form is called as "display" and the action associated
    is "submit". On submit, i want to get the values of this text boxes (which user
    can edit) in the JPF class's submit() method.
    For this, following is done:
    The form contains only one variable of type String array. and the name of variable
    is "name" in the form class.
    In the JPF class, declare "myform" variable(instance vrbl) and initialise the
    form class in begin() method. Also, the array "name" is set to "one","two","three".
    begin() returns Forward("success",myform).
    submit() looks like
    * @jpf:action form="myform"
    * @jpf:forward name="success" path="ok.jsp"
    protected Forward submit(SubmitForm form)
    String name[] = form.getName();
    for(int i=0;i<name.length;i++){
    System.out.println("Value= " +name);
    I am getting ArrayIndexOutofBounds exception for i>0.
    The form class looks like
    public String[] getName()
    // For data binding to be able to post data back, complex types and
    // arrays must be initialized to be non-null.
    if(this.name == null || this.name.length == 0)
    this.name = new String[1];
    return this.name;
    Question is:
    1. Do i need to initialise the "name" array in forms getName() method to correct
    size? (3 in this case)
    2. The action of submit() contains "myform" which was already initilised with
    correct array name. Why do i get ArrayIndexOutOfBounds?
    thanks

    The id of the upload_opp object is based on its position within the parent elements. in this case it would be something like uploadForm:upload_grp:_id0:upload_opp. The _id0 is generated because your panelGrid does not have an id, so JSF makes one up.
    To reference the nested form, it would just be the id since it is not being handled by JSF.
    It would probably be best for you to use the Apache MyFaces fileUpload component, or build your own custom component. That would make this page a bit more elegant and you don't have mixed html and jsf component code.
    The alternative is to maybe write a javascript utility method like getElementWithId(...) to find an element that ends in the specified identifier.

  • Element Undifined in form error.

    Hi,
    I have the following code:
    There will be as many hidden fields as the number of rows
    retrieved by the query "getCities". Each is distinguished with the
    value of level_detail_uid for each loop.
    city.cfm
    <html>
    <head>
    <title>Update </title>
    <script language="JavaScript">
    function delete_city(level_detail_uid,city_id ,cnam)
    if ( confirm("Are you sure to delete the pricing-information
    for " + city_id + " ?") )
    window.location =
    'city_pricing_display.cfm?delete_level_detail_uid=' +
    level_detail_uid +
    '&delete_city_name=' + city_id + '&del_cnam=' +
    cnam;
    <cfif isDefined("delete_level_detail_uid") and
    delete_level_detail_uid is NOT "">
    <cfoutput> #del_cnam#</cfoutput>
    <cftransaction>
    </cfquery>
    </cfif>
    </cftransaction>
    </cfif>
    <form method="POST" name="city_details"
    action="city_update_pop.cfm">
    <table border="0" cellspacing="0" cellpadding="0"
    width="100%">
    <tr>
    <td>
    <cfquery name="getCities"
    datasource="#application.alcdatasource#">
    SELECT city_name, dtl.level_detail_uid,
    FROM alc_pricing_level_details dtl, alc_city c,
    alc_detail_provider prvdr
    WHERE level_desc_uid = #level_desc_uid#
    AND dtl.level_detail = c.city_id(+)
    AND prvdr.level_detail_uid = dtl.level_detail_uid
    ORDER BY upper(city_name)
    </cfquery>
    <cfloop query="getCities">
    <cfoutput>
    <input type="hidden" name="cityname_#level_detail_uid#"
    value="#getCities_city_name#">
    </cfoutput>
    <td>
    <a
    href="JavaScript:delete_city('#level_detail_uid#','#city_id#','#form.cityname_#level_deta il_uid##')"
    class="PageInnerNavigationHeadingSmall">Delete City</a>
    </td>
    </table>
    </body>
    </form>
    </html>
    Suppose the level_detail_uid is 12345.
    After executing this it says
    "element cityname_ is undefined in form
    Please kindly help.....
    Thanking in advance....
    Regards,
    Aswathy.

    I agree with cf_matt. There are several problems with the
    code. The field form.cityname_#level_detail_uid# won't exist when
    the form is first loaded. So you can't use it in your link unless
    you define a default value first
    <a
    href="JavaScript:delete_city('#level_detail_uid#','#city_id#','#form.cityname_#level_deta il_uid##')"
    >...</a>
    Also, the syntax to retreive the value is wrong. Assuming the
    variable is defined, try using array notation
    #form["cityname_#level_detail_uid#"]#

  • Help on converting bmp to 8bit grayscale arrays

    I am using Labview 6, and need to read a bmp file and obtain the grayscale values in an array to analyse the data. What is the best way of doing this.

    Hi mepgkas;
    I do not have a clear idea of what you want to accomplish. I tried to go through your vi, but it is not clear to me how it is suppose to work with the images.
    In the attachment you will find three VIs. The first (formula_final_2.vi) do the same as your first VI. I just modified it a little to try to understand its operation. I hope you find the modifications helpful.
    The second file (formula_final_test.vi) is also your original VI. I modified it to work as a subVI. The third VI (example w gray.vi) uses the second VI as a subVI and input the two images. I assumed that picture 1 should go in ta1, picture 2 should go in ta2 and the resulting array is formed using t2 as it elements. Chances are I am wrong, however, it shoul
    d give you a good starting point.
    Best regards;
    Enrique
    www.vartortech.com
    Attachments:
    example_2.zip ‏43 KB

Maybe you are looking for

  • How do I see my all-day events in Notification Center?

    I cannot see my all-day calendar events in Notification Center.  How do I change this so that they show without me having to go to the Calendar app to see them?

  • URGENT issue in MRP

    hello In MMSC  enter storage location collectivily list like    SL01  and SL02 but i maintaind MRP indication 1 for SL01 now  I want delete the the MRP indicatior '1'   for SL01 it is not possible for me, if any body nows pls guide me how to deleta M

  • Does unlocked iPhone 6 support both GSM and CDMA?

    If I buy an iPhone 6 at the Apple store with the unlocked T-Mobile set-up, can I activate it on a GSM carrier and later switch to a CDMA carrier?

  • Inner join on Buffred table and not buffered table.

    Hi guys,    Can you suggest me how can i write select query using inner join on buffered table and not buffered table. i written like this. is it right? SELECT a~vbeln                                   a~vkorg             a~kunnr                     

  • ICould seems to have uninstalled itself from PC

    I just accessed the iCloud icon from the taskbar yesterday, but today it is no longer in the taskbar, nor can I find it anywhere in my program files.  It is, however, showing up in the list of programs that can be uninstalled via the control panel.