close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Update Record Behaviour has me baffled!

Thread began 9/26/2011 6:14 am by acaciasd344844 | Last modified 9/26/2011 11:38 am by acaciasd344844 | 783 views | 2 replies

Jason ByrnesWebAssist

the problem is that the form tags are outside of the repeate region. this men that the page is being create with one form on it, and inside that one form the form elements are being repeated.


change the code at lines 591 - 632:

php:
<td colspan="3"><form id="form1" name="form1" method="POST">

        <?php
    
// RepeatSelectionCounter_1 Begin Loop
    
$RepeatSelectionCounter_1_IterationsRemaining $RepeatSelectionCounter_1_Iterations;
    while(
$RepeatSelectionCounter_1_IterationsRemaining--){
        if(
$RepeatSelectionCounterBasedLooping_1 || $row_Recordsetsearchallocatedstock){
?>
<table width="100%" border="0">
          <tr>
            <td><a href="m_jobdetails_addbox.php?stockname=<?php echo $row_Recordsetshowallproducts['subproducttypesid']; ?>&productgrp=<?php echo $row_Recordsetshowallproducts['groupid']; ?>&customerid=<?php echo $row_showcustomerdetails['customerid']; ?>&workorderid=<?php echo $row_showcustomerdetails['workorderid']; ?>"><?php echo $row_Recordsetsearchallocatedstock['serialnumber']; ?></a><span class="style26"><strong><strong><?php echo $row_Recordsetsearchallocatedstock['stockid']; ?></strong></strong></span>
                  <label>
                  <input name="stockyid" type="text" id="stockyid" value="<?php echo $row_Recordsetsearchallocatedstock['stockid']; ?>" />
                  </label>
                  <input name="hf_subprodid" type="hidden" id="hf_subprodid" value="<?php echo $row_Recordsetsearchallocatedstock['stockname']; ?>" />
                  <input name="hf_workorderid" type="hidden" id="hf_workorderid" value="<?php echo $row_showcustomerdetails['workorderid']; ?>" />
                  <input name="hf_customerid" type="hidden" id="hf_customerid" value="<?php echo $row_showcustomerdetails['customerid']; ?>" />
                  <input name="hf_productgrp" type="hidden" id="hf_productgrp" value="<?php echo $row_Recordsetsearchallocatedstock['groupid']; ?>" />
                  <input name="hf_price" type="hidden" id="hf_price" value="<?php echo $row_Recordsetsearchallocatedstock['price']; ?>" />
                  <input name="hf_stockid" type="hidden" id="hf_stockid" value="<?php echo $row_Recordsetsearchallocatedstock['stockid']; ?>" />
                  <input name="allocatedto" type="hidden" id="allocatedto" value="Customer" />
                  <input name="hf_installeddate" type="hidden" id="hf_installeddate" value="<?php echo date ('Y-m-d H:i:s'); ?>" />
                  <input name="hf_installedby" type="hidden" id="hf_installedby" value="<?php echo $_SESSION['MM_Username']; ?>" />
                  <label>
                  <input type="submit" name="button" id="button" value="Submit" />
                    MUST NOT SHOW ALLOCATED BOXES</label></td>
          </tr>
        </table>
<?php
    
// RepeatSelectionCounter_1 Begin Alternate Content
    
else{
?>
<?php 
// RepeatSelectionCounter_1 End Alternate Content
        
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
            if(!
$row_Recordsetsearchallocatedstock && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining 0;}
            
$row_Recordsetsearchallocatedstock mysql_fetch_assoc($Recordsetsearchallocatedstock);
        }
        
$RepeatSelectionCounter_1++;
    } 
// RepeatSelectionCounter_1 End Loop
?>
            
            
      </form>      </td>




to:

php:
<td colspan="3">

        <?php
    
// RepeatSelectionCounter_1 Begin Loop
    
$RepeatSelectionCounter_1_IterationsRemaining $RepeatSelectionCounter_1_Iterations;
    while(
$RepeatSelectionCounter_1_IterationsRemaining--){
        if(
$RepeatSelectionCounterBasedLooping_1 || $row_Recordsetsearchallocatedstock){
?>
<form id="form1_<?php echo $row_Recordsetsearchallocatedstock['stockid']; ?>" name="form1_<?php echo $row_Recordsetsearchallocatedstock['stockid']; ?>" method="POST"><table width="100%" border="0">
          <tr>
            <td><a href="m_jobdetails_addbox.php?stockname=<?php echo $row_Recordsetshowallproducts['subproducttypesid']; ?>&productgrp=<?php echo $row_Recordsetshowallproducts['groupid']; ?>&customerid=<?php echo $row_showcustomerdetails['customerid']; ?>&workorderid=<?php echo $row_showcustomerdetails['workorderid']; ?>"><?php echo $row_Recordsetsearchallocatedstock['serialnumber']; ?></a><span class="style26"><strong><strong><?php echo $row_Recordsetsearchallocatedstock['stockid']; ?></strong></strong></span>
                  <label>
                  <input name="stockyid" type="text" id="stockyid" value="<?php echo $row_Recordsetsearchallocatedstock['stockid']; ?>" />
                  </label>
                  <input name="hf_subprodid" type="hidden" id="hf_subprodid" value="<?php echo $row_Recordsetsearchallocatedstock['stockname']; ?>" />
                  <input name="hf_workorderid" type="hidden" id="hf_workorderid" value="<?php echo $row_showcustomerdetails['workorderid']; ?>" />
                  <input name="hf_customerid" type="hidden" id="hf_customerid" value="<?php echo $row_showcustomerdetails['customerid']; ?>" />
                  <input name="hf_productgrp" type="hidden" id="hf_productgrp" value="<?php echo $row_Recordsetsearchallocatedstock['groupid']; ?>" />
                  <input name="hf_price" type="hidden" id="hf_price" value="<?php echo $row_Recordsetsearchallocatedstock['price']; ?>" />
                  <input name="hf_stockid" type="hidden" id="hf_stockid" value="<?php echo $row_Recordsetsearchallocatedstock['stockid']; ?>" />
                  <input name="allocatedto" type="hidden" id="allocatedto" value="Customer" />
                  <input name="hf_installeddate" type="hidden" id="hf_installeddate" value="<?php echo date ('Y-m-d H:i:s'); ?>" />
                  <input name="hf_installedby" type="hidden" id="hf_installedby" value="<?php echo $_SESSION['MM_Username']; ?>" />
                  <label>
                  <input type="submit" name="button" id="button" value="Submit" />
                    MUST NOT SHOW ALLOCATED BOXES</label></td>
          </tr>
        </table></form>
<?php
    
// RepeatSelectionCounter_1 Begin Alternate Content
    
else{
?>
<?php 
// RepeatSelectionCounter_1 End Alternate Content
        
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
            if(!
$row_Recordsetsearchallocatedstock && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining 0;}
            
$row_Recordsetsearchallocatedstock mysql_fetch_assoc($Recordsetsearchallocatedstock);
        }
        
$RepeatSelectionCounter_1++;
    } 
// RepeatSelectionCounter_1 End Loop
?>
            
            
            </td>




this way each repeated row will be a unique form.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...