I am trying to show a message to user if email address is already registered or message saying "thanks for signing up!"
Form 1:
<div>
<button type="submit" data-target="#publisherVerification">Sign up</button>
</div>
<div id="publisherVerification" ng-if="flag===true">
<div>
<p>Thank you for signing up.</p>
</div>
</div>
<div id="publisherVerification" ng-if="flag===false">
<div>
<p>User already registered. Please use login.</p>
</div>
</div>
Form 2:
<div>
<button type="submit" data-target="#artistVerification">Sign up</button>
</div>
<div id="artistVerification" ng-if="flag === true">
<div>
<p>Thank you for signing up</p>
</div>
<div id="artistVerification" ng-if="flag === false">
<div>
<p>User already registered. Please use login.</p>
</div>
</div>
</div>
Both the above forms are in the same page and calling same function on button click.
Its working but both forms are displaying messages if the user is "already register or new user" because they are calling same function. How do I show message for particular form only. I know I can create separate function for each form but I want try it with single function.