Pass or append the value from input text to <a href=“sms?:body=”>

I’m trying to look for a how I can pass the value from in input textbox *href=“sms:?body” It is a dynamic value that changes every time a user creates a new account. The idea is that once I click on the “Send Invite by SMS” the value or referral code that is included in the input text will also be included in the SMS body message.

enter image description here

Sample work in progress

<input class="input" disabled="true" placeholder="Referral Code" ng-model="account.referral_code_string" id="input-refcode">

<a ng-model="account.referral_code_string" href="sms:?body=" class="sms-btn" >Send Invite by SMS</a>

Update

I have managed to bind the input text on the sms anchor but when I try tap on the button the SMS app doesn’t open up. It shows unsafe:sms but when I try using only href with a sample text(href=“sms:?body=text”) it opens up the SMS app

enter image description here

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.