@andytough , @halftrainedharry is right, only name attribute matters here(its transmission is checked in the snippet for compliance with &submitVar), you could use any possible value you like.
I now think my problem is being caused by something I failed to mention in my initial post. The data I am updating is being stored in extra user fields created using @bobray s amazing classExtender, GetExtUsers. https://modx.com/extras/package/classextender
Yes, here the value of the $_POST parameter is compared to the lexicon entry.
In the Login extra there is only a check if the $_POST parameter is not empty.
Youâll have to change the snippet ExtUserUpdateProfile to make it work:
Thank you @halftrainedharry . I will report back on which option works. As this will affect the whole site, not just the bit I am working on at the moment I might not get to test it immediately.
When changing a snippet, it is usually a good idea to duplicate the snippet first and not change the original snippet directly (as your changes may get overwritten on the next update of the extra).
So I would duplicate ExtUserUpdateProfile and then adjust and test the new snippet. This way it also doesnât affect the rest of your site.
It is also important to mention that issue in the according repository. I donât see a reason to compare the lexicon text, but maybe Bob has a reason for this.
Hi @jako thanks for the suggestion. I have tested @halftrainedharry 's solution and it works. Iâll pass it on to @bobray in the repository and see if he has any thoughts on whether it is necessary or not.
Well actually with this change you still have to use login-updprof-btn for the name of the submit button. If you want to support the property submitVar as well (to allow for buttons with a different name-attribute), then the code probably has to look like this:
Hi @halftrainedharry . Thanks. Your original solution allowed me to change the value of the button. It seems that there was not a problem with submitVar after all, but that I had made a typo in my submitVar entry, so sorry, that was a bit of a red herring!
Itâs been a while, but I think my reasoning was that if you wanted to change the text of the button, the best place to do it would be in Lexicon Management. That way you wouldnât need to modify the code, and the change would survive upgrades to the package.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting â+ New Topicâ.