Increase the Redirect to URL field length

Tom Wisneski asked on June 12, 2020 18:07

Is it possible to increase the "Redirect to URL" form field character length? I am including querystring values, which are ending being cutoff due to the field character restriction (I believe). Anyways, just curious if there is a way to do this. Thanks.

Correct Answer

Brenden Kehren answered on June 13, 2020 20:14

You can modify the class in the UI but it requires a change in the class and resources tables to perform the edit. This is not 100% though as there may be other places in code where the field is limited in length. So while it can be done, it's not recommended as you'd be changing base code which will cause problems with upgrades and possibly other functionally.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Juraj Ondrus answered on June 15, 2020 07:51

Well, as mentioned by Brenden. Make sure you will document the change properly in the project documentation to avoid future issues. Also, I assume you mean the field used in an online form configuration. In this case, the default size is set to 200 characters, you can increase it in \CMS\CMSModules\BizForms\Tools\BizForm_Edit_General.aspx file:
<cms:CMSTextBox ID="txtRedirect" runat="server" MaxLength="200" />

But the hotfix or upgrade may revert it back to defaults.

0 votesVote for this answer Mark as a Correct answer

Tom Wisneski answered on June 15, 2020 14:51

Brenden and Juraj -- Thank you for your replies on this. Brenden...you said exactly what I was thinking when I asked the question. I is doable, but it is possible that in editing the length, this could affect how updates (or even currently other previously created items work). Thank you both. It was just confirming what I needed to know. It is always hard to find documentation of tutorial stuff beyond some basic things for Kentico.

0 votesVote for this answer Mark as a Correct answer

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