My Profile Submit Button Text cannot be changed

Robert Redhead asked on March 13, 2015 14:08

I am having an issue with the MyProfile webpart, where I am trying to simply change the text of the submit button. I am using the out of the box webpart with no changes, all I'm doing is modifying the form cms.user.EditProfile by giving it a custom layout (ASCX), auto-generating using "Generate default layout", and adding to the bottom:

Button Text should NOT be submit <br/>
<cms:FormSubmit runat="server" ID="fSubmit" CssClass="somewhackyclass" Text="My Submit" />

What happens is that the text remains unchanged. Looking at the webpart code and the associated control, there doesn't seem to be anything that would override my setting, and I'm pretty sure this works for other customforms. The really strange thing is that the CssClass DOES get passed and shows up in the rendered input.

I tried changing it to <cms:CMSButton runat="server" ID="fSubmit" CssClass="somewhackyclass" Text="My Submit" /> but then I end up with two buttons and the one with the correct text doesn't hook to the event to update the user. I also attempted to change the ResourceString value to something other than "general.submit" but that setting was ignored as well.

Any thoughts?

Edit: updating the resource string isn't an option, because of reasons the user profile is split on page between two forms (each showing a different set of user info). Each form needs a different submit button with different text (Update information/Update subscriptions).

Recent Answers


Roman Koníček answered on April 21, 2015 12:34

Hi,

Could you please go to ~\CMSModules\Membership\Controls\MyProfile.ascx.cs -> OnPreRender and add the following line:

editProfileForm.SubmitButton.ResourceString = "mygeneral.myok"

That should do the trick.

Best regards, Roman Konicek

1 votesVote for this answer Mark as a Correct answer

Laurence Middleton answered on October 23, 2015 20:03

A coworker turned up this page looking to do the same thing, and found that she could pass in the resource string of her choice.

e.g. (approximately) editProfileForm.SubmitButton.ResourceString = "Save Changes"; // or resource string with that text NOT editProfileForm.SubmitButton.Text= "Save Changes";

btw: Hi, Robert! Either we're coworkers or you share names with a developer in my office. :-)

2 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.