I’ve searched all over and can’t find a solution. I found this bug report that says I should just be able to change the id to fix the issue.
I have a login form on a page that also has a signin form.
They both use a users model with difference scenarios and have password fields with the same ID.
I’ve tried change changing the “id” for the login field in the htmlOptions array, but then it doesn’t react to any changes. It seems the js is fixed to work with a specific name.
I looked at all the extra options and I found the inputComtainer but that only seems to be for the error() method and if I change the id for the textField and set the inputContainer for the error() to that id, it doesn’t seem to have any effect. It doesn’t validate on change.
Which is really hacky… I’d like a better method, but this way at least the login won’t interfere with any other forms (as long as I don’t actually need tabular input for that model)
Thought I’d share my solution, in case it helps someone.
Quick background: I have a navbar with a popup login form. In some cases (i.e. if you’re already on the login page itself) there’s a second, main login form that uses the same form model class – and thus was creating conflicting input IDs.
My main form model was a class called LoginForm. So I just created a second form model that extended that, but with no additional functionality:
class LoginForm2 extends LoginForm {}
And I used that class when creating the model for my secondary (popup) login form. Then in my controller action, I just did this: