juraganpsd Posted August 15, 2013 Share Posted August 15, 2013 (edited) Hello.. I have a payment confirmation form module, but i want to add some field. Here's some of field on my .tpl form: <p class="required text"> <label for="payment_method">{l s='Payment method' mod='paymentconfirmation'}</label> <select name="payment_method" id="payment_method">{$paymentmethod}</select> <sup>*</sup> </p> <p class="text"> <label for="from_bank">{l s='From Bank' mod='paymentconfirmation'}</label> <input type="text" id="from_bank" name="from_bank" /> </p> <p class="text"> <label for="from_name">{l s='Account Name' mod='paymentconfirmation'}</label> <input type="text" id="from_name" name="from_name" /> </p> <p class="text"> <label for="from_number">{l s='Account Number' mod='paymentconfirmation'}</label> <input type="text" id="from_number" name="from_number" /> </p> the $paymentmethod would showing 2 option value : - Bank Wire Transfer - Cheque Payment what i want to achieve is.. how to make the From Bank, Account Name, Account Number field is displayed if the $paymentmethod = Bank Wire Transfer? i'm trying to sort it out by editing the .tpl form into this : <p class="required text"> <label for="payment_method">{l s='Payment method' mod='paymentconfirmation'}</label> <select name="payment_method" id="payment_method">{$paymentmethod}</select> <sup>*</sup> </p> {if $paymentmethod = 'Bank Wire Transfer} <p class="text"> <label for="from_bank">{l s='From Bank' mod='paymentconfirmation'}</label> <input type="text" id="from_bank" name="from_bank" /> </p> <p class="text"> <label for="from_name">{l s='Account Name' mod='paymentconfirmation'}</label> <input type="text" id="from_name" name="from_name" /> </p> <p class="text"> <label for="from_number">{l s='Account Number' mod='paymentconfirmation'}</label> <input type="text" id="from_number" name="from_number" /> </p> {/if} but it doesn't work out.. does anybody know how to fix this? Edited August 15, 2013 by juraganpsd (see edit history) Link to comment Share on other sites More sharing options...
tomerg3 Posted August 16, 2013 Share Posted August 16, 2013 You are missing a ' between transfer and } and it should be == (2 =) Link to comment Share on other sites More sharing options...
juraganpsd Posted August 17, 2013 Author Share Posted August 17, 2013 (edited) ahhh.. you're right @tomerg3! but it still doesn't work the field doesn't show up when i select the "Bank Wire Transfer" <p class="required text"> <label for="payment_method">{l s='Payment method' mod='paymentconfirmation'}</label> <select name="payment_method" id="payment_method">{$paymentmethod}</select> <sup>*</sup> </p> {if $paymentmethod == 'Bank Wire Transfer'} <p class="text"> <label for="from_bank">{l s='From Bank' mod='paymentconfirmation'}</label> <input type="text" id="from_bank" name="from_bank" /> </p> <p class="text"> <label for="from_name">{l s='Account Name' mod='paymentconfirmation'}</label> <input type="text" id="from_name" name="from_name" /> </p> <p class="text"> <label for="from_number">{l s='Account Number' mod='paymentconfirmation'}</label> <input type="text" id="from_number" name="from_number" /> </p> {/if} Edited August 17, 2013 by juraganpsd (see edit history) Link to comment Share on other sites More sharing options...
tomerg3 Posted August 18, 2013 Share Posted August 18, 2013 Try to view source in the browser, and see the exact way $paymentmethod is displayed (IE Casing, additional spaces, etcc), as it must match the if statement. Link to comment Share on other sites More sharing options...
Recommended Posts