<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="BSTSTWJ2TNN">
<input type="hidden" name="custom" value="this.user?.uid">
<button mat-flat-button color="warn">
{{
project.name
}}
</button>
</form>
I need to pass an angular property named "this.user?uid" from a component to an HTML hidden form value with the name "custom" and will be passed to a paypal transaction.
I am not quite sure how to do this in angular but I have seen examples done in PHP.
Can anyone please point me to the right direction?
Thank you!
Try putting it in the double brackets:
<input type="hidden" name="custom" value={{this.user?.uid}}>