How do I add a brick to sign up that will appear on email reciept?

Discussion in 'Payments processing' started by crystalmedia, Oct 1, 2020.

  1. crystalmedia

    crystalmedia Member

    Joined:
    Oct 15, 2013
    Messages:
    69
    Hi. I need to add 2 bricks to the sign up form. One for company name and one for vat#. If those two bricks are filled out by the client, I want them to appear on the client's email receipt. If left blank, then they do not appear.

    Any suggestions on how to achieve this? I've searched the forums, but no luck.

    Thank you!
  2. crystalmedia

    crystalmedia Member

    Joined:
    Oct 15, 2013
    Messages:
    69
  3. crystalmedia

    crystalmedia Member

    Joined:
    Oct 15, 2013
    Messages:
    69
    But how to not include in the PDF the text that reads VAT# if that field is blank??

    $col->prepend("VAT#: {$user->data()->get('vat_nr')}");

    Any ideas?? Thanks!

    EDIT; or an else statement for vat_nr, if left blank print "n/a". That will work too. Any help appreciated thank you!
  4. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    You can use this code:
    PHP:
    if ($vat_nr $user->data()->get('vat_nr')) {
        
    $col->prepend("VAT#: {$vat_nr}");
    }

Share This Page