Skip to content

Converting Forms

Trevor Fayas edited this page Mar 14, 2023 · 3 revisions

Next step is to convert the Online Forms. The upgrade tool will stop the upgrade if it detects any portal engine Online Forms, so they must be converted over.

The Upgrade Operations -> UI is pretty simple, and just provides a way to determine the Component code name for the elements used on the Forms. You can add in missing Component Names as you wish and create them later.

BUG

The Default Form Components in the UI matches attempts to match the Default Kentico provided form components where provided, but it uses the ClassName, not the identifier (ex "DropDownComponent" instead of "Kentico.DropDown")

There is also a bug where it seems to be adding a new line character and carriage return to the identifier, which invalidates it.

To fix, run the following SQL script after conversion:

update CMS_CLass set ClassFormDefinition = 
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
Replace(ClassFormDefinition, '<componentidentifier>CheckBoxComponent', '<componentidentifier>Kentico.CheckBox'),
'<componentidentifier>ConsentAgreementComponent','<componentidentifier>Kentico.ConsentAgreement'),
'<componentidentifier>DropDownComponent','<componentidentifier>"Kentico.DropDown'),
'<componentidentifier>EmailInputComponent','<componentidentifier>Kentico.EmailInput'),
'<componentidentifier>FileUploaderComponent','<componentidentifier>Kentico.FileUploader'),
'<componentidentifier>MultipleChoiceComponent','<componentidentifier>Kentico.MultipleChoice'),
'<componentidentifier>IntInputComponent','<componentidentifier>Kentico.IntInput'),
'<componentidentifier>RadioButtonsComponent','<componentidentifier>Kentico.RadioButtons'),
'<componentidentifier>RecaptchaComponent','<componentidentifier>Kentico.Recaptcha'),
'<componentidentifier>TextAreaComponent','<componentidentifier>Kentico.TextArea'),
'<componentidentifier>TextInputComponent','<componentidentifier>Kentico.TextInput'),
'<componentidentifier>USPhoneComponent','<componentidentifier>Kentico.USPhone'),
CHAR(13)+char(10)+'</componentidentifier>', '</componentidentifier>')
where ClassName like '%BizForm.%'

Clone this wiki locally