Bug reports Found a bug? Post it here please.
Version 7.x > Bug reports > Set CustomTableForm BasicForm SubmitButton Text View modes: 
User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 3/30/2013 11:39:14 PM
   
Set CustomTableForm BasicForm SubmitButton Text
I've created a custom control utilizing the CustomControlForm and setting alternate forms. I'm trying to set the CustomTableForm.BasicForm.SubmitButton.Text on page load and it never changes to what I set it to, it always reverts back to "OK". I've debugged through the code and can see it being set, although it never displays. I'm able to set the SubmitButton.CssClass without a problem, why not the button text?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/5/2013 7:45:51 PM
   
RE:Set CustomTableForm BasicForm SubmitButton Text
Hi,

Just a short background: When you call BasicForm.<blahblah> - this runs the initialization of the custom table in given BasicForm context, create child controls and some more operations. So, the life cycle is already running and it is not possible to inject your setting into it.

It should be possible to set this in the OnPreRender() event - I hope it won't be too late.
Moreover, this will work for sure:

Set the string to your custom in the Page_Init event like this:
custTableForm.BasicForm.SubmitButton.ResourceString and add your custom value to it.

Best regards,
Juraj Ondrus