Enable/Disable form fields in Jade Template based on previous form field values

I have an use case wherein i need to enable certain form fields based on the input i received in the previous fields of the form. For example,i have a jade/pug based input form where i present all the fields related to payment. The payment could be by Cash or Cheque. If the payment is by cheque, i need to present more fields in the form such as Cheque Number. How can i achieve the same with Jade Template? I want to decide whether to show the Cheque number field or not based on what the user entered in the Payment Mode field. If the user entered cash for payment mode, i need not present cheque number field. If the user entered cheque for payment mode, then i need to dynamically present cheque number field. I donot want the user to press submit and then have the form data processed to access the data. I would like to access the form data within jade page, even before it gets submitted. Please note that i am a novice to UI. This thread talks about enabling attributes dynamically, but doesn't specify how to access previously entered fields from the form.