Welcome Guest, Not a member yet? Register   Sign In
Edit, validate, re-edit issue using set_value with optional parameter
#5

[eluser]billmce[/eluser]
In the controller function I'm still showing 'creditor_edit_view1' and 'creditor_edit_view2' (my workaround) instead of the goal of a single form 'creditor_edit_view'.

This is the 'creditor_edit_view' VIEW
====================================
Code:
<h1>&lt;?php echo $title; ?&gt;</h1>
&lt;?php
echo validation_errors();  // if we're saving, and find errors ... show 'em here.
?&gt;
&lt;?php

echo form_open('creditors/edit_creditor');

?&gt;

<fieldset>
<legend>Company Information</legend>
    <ol>
    <li><label for="CategoryID">CategoryID:</label>
    &lt;?php // without quotes -- no data , with quotes data but <div issue ?&gt;
        &lt;input type="text" name="CategoryID" value="&lt;?php echo set_value('CategoryID',$CategoryID); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="Company">Company:</label>
    &lt;input type="text" name="Company" value="&lt;?php echo set_value('Company',$Company); ?&gt;"  /&gt;&lt;/li>


    <li><label for="SearchName">SearchName:</label>
    &lt;input type="text" name="SearchName" value="&lt;?php echo set_value('SearchName',$SearchName); ?&gt;"  /&gt;&lt;/li>
    </ol>

</fieldset>

<fieldset>
<legend>Address Information</legend>
    <ol>
    <li><label for="Building">Building:</label>
    &lt;input type="text" name="Building" value="&lt;?php echo set_value('Building', $Building); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="StreetNumber">StreetNumber:</label>
    &lt;input type="text" name="StreetNumber" value="&lt;?php echo set_value('StreetNumber', $StreetNumber); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="Unit">Unit:</label>
    &lt;input type="text" name="Unit" value="&lt;?php echo set_value('Unit', $Unit); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="StreetNumberSuffix">Suffix: </label>
    &lt;input type="text" name="StreetNumberSuffix" value="&lt;?php echo set_value('StreetNumberSuffix', $StreetNumberSuffix); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="StreetName">StreetName:</label>
    &lt;input type="text" name="StreetName" value="&lt;?php echo set_value('StreetName', $StreetName); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="StreetType">StreetType:</label>
    &lt;input type="text" name="StreetType" value="&lt;?php echo set_value('StreetType', $StreetType); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="StreetDirection">StreetDirection:</label>
    &lt;input type="text" name="StreetDirection" value="&lt;?php echo set_value('StreetDirection', $StreetDirection); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="Municipality">Municipality:</label>
    &lt;input type="text" name="Municipality" value="&lt;?php echo set_value('Municipality', $Municipality); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="ProvinceState">ProvinceState:</label>
    &lt;input type="text" name="ProvinceState" value="&lt;?php echo set_value('ProvinceState', $ProvinceState); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="PostalCodeZip">PostalCodeZip</label>
    &lt;input type="text" name="PostalCodeZip" value="&lt;?php echo set_value('PostalCodeZip', $PostalCodeZip); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="Country">Country:</label>
    &lt;input type="text" name="Country" value="&lt;?php echo set_value('Country', $Country); ?&gt;"  /&gt;&lt;/li>
    </ol>
</fieldset>
<fieldset>
<legend>Miscellaneous</legend>
    <ol>
    <li><label for="LTCCode">LTCCode:</label>
    &lt;input type="text" name="LTCCode" value="&lt;?php echo set_value('LTCCode', $LTCCode); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="GovernmentCode">GovernmentCode</label>
    &lt;input type="text" name="GovernmentCode" value="&lt;?php echo set_value('GovernmentCode', $GovernmentCode); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="PrivacyPolicyExempt">PrivacyPolicyExempt:</label>
    &lt;input type="text" name="PrivacyPolicyExempt" value="&lt;?php echo set_value('PrivacyPolicyExempt', $PrivacyPolicyExempt); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="ProofOfClaimRequired">ProofofClaimRequired:</label>
    &lt;input type="text" name="ProofOfClaimRequired" value="&lt;?php echo set_value('ProofOfClaimRequired', $ProofOfClaimRequired); ?&gt;"  /&gt;&lt;/li>
    
    <li><label for="AdditionalInformation">Additional Information:</label>
    &lt;input type="text" name="AdditionalInformation" value="&lt;?php echo set_value('AdditionalInformation', $AdditionalInformation); ?&gt;"  /&gt;&lt;/li>
    </ol>
</fieldset>

<fieldset class="submit">
    &lt;?php echo form_submit('BtnSaveCredType',$BtnSaveCredType); ?&gt;
</fieldset>
&lt;?php


Messages In This Thread
Edit, validate, re-edit issue using set_value with optional parameter - by El Forum - 03-19-2010, 06:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB