Add/remove field of flexible form for different page in page edit mode of Pages application

Dang Thanh asked on January 20, 2022 05:16

My client wants in project using kentico 12 to be able to add/remove field of flexible form for each different page in page edit mode of Pages application. I don't know if kentico supports extension or something else for this part. It's really hard to support this for the project I'm working on. Let me know if any information is available. Thanks!

Recent Answers


Brenden Kehren answered on January 20, 2022 05:46

Sounds like you want the ability to dynamically add fields to a page type without modifying it directly in the page type is that what you're asking? I might ask a further question to possibly describe the need for these additional fields to be added dynamically? There may be another solution you haven't thought of yet.

0 votesVote for this answer Mark as a Correct answer

Dang Thanh answered on January 20, 2022 05:55

Each program page will have 7 step form, and 7 step form can be reused in other program pages and some fields of 7 step form can be increased or decreased depending on the program page. Of course, the client wants to manage the records of those 7 step forms. Do you have any solution for this problem?

0 votesVote for this answer Mark as a Correct answer

Dang Thanh answered on January 20, 2022 09:26

For example, I have a Test form in Forms application with 2 fields text and checkbox. In Pages application, I add that form to page A and want to add a dropdown list field in that form, page B then I want to remove the checkbox field. Do you have any solution for this problem? Can Kentico support this?

0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on January 20, 2022 14:08

Hi Dang,

Are you using Portal Engine (web forms) or MVC development model?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on January 23, 2022 03:22

You could build this out using Page Types using Kentico 13 .NET Core. You'd have a "form" page type. Then create a "form group" page type. Then create child page types like Radio button, Checkbox, Textbox, etc. and place those below the form group page type. In your MVC app, you can build that out pretty easy. The navigation through the steps would be dependent on the order of the "form group" page type. Those are essentially the sections of your form and have a button to navigate to the next option.

Now what you need to do is be able to store the data is a custom table or something. This table would need to be as dynamic as your content tree is OR map your content tree somehow to your custom table. This would be the more complicated part but could be done by using global handlers.

It may be overcomplicating things but it allows the overall setup of the form to be dynamic as they want. Someone else may have a better option.

0 votesVote for this answer Mark as a Correct answer

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