How can I achieve the following with the New Universal Login’s page templates:
login_hint in page templates
- Dynamically disable edit of the email field if
login_hint variable is present
Note: I could pass
ext-login_hint as an extra param and use JS to disable the
Edit link but I want to figure out if there is a more straightfoward way
Generally, we warn against using the page templates API to change content within the prompt itself (doesn’t mean it’s not possible, just that it may break unexpectedly). I think this would fall within that scope.
Also, be aware that disabling editing of the email field wouldn’t necessarily prevent a user from manually passing a request with a different email (i.e. this shouldn’t be used as a security measure).
Hope that helps!
Also, feel free to drop us some Feedback if you have a feature request.
@dan.woda I appreciate your response. However, my main question was how to dynamically disable update of the email field in the
signup-password screen if
login_hint has been set. This email is pre-populated using
login_hint for application specific purposes and we wouldn’t want the user to change it to something else. Could you guide me on that?
There is currently no feature to disable the “edit” button, and implementing it with page templates would be not recommended (as I mentioned, we don’t recommend editing anything within the prompt itself).
Feel free to submit a feature request in our Feedback category.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.