Convert Blank Panel Form into Standard / Custom HTML Forms

Standard Forms and Custom HTML Forms both have a html propertie under Common Group:
image
That way you can convert a Standard Form into a Custom HTML form and vice-versa.

However, Blank Panel Forms don’t have that option. By the properties of self in Blank Panels, those are base containers, almost or exactly like a ColumnPanel, so I’m guessing the issue for not allowing those changes would be related to that, but also wondering why that would be an issue.

Most of the time I want Blank Panels for my forms, since I use the Routing module from anvil_extras, however sometimes I need to convert a form I started as a Blank Form to a Custom HTML to add a specific style to that form, which is a “lot” of work to do currently.

Is there any way of implementing the option of html (maybe adding to the selector an option of “Blank” along with Custom and each HTML option)?

2 Likes

I support this feature request, but I’m also here to offer unsolicited workarounds.

Is there something about Routing that precludes using (blank) Custom HTML Forms in the first place, instead? In my mind, best practice is to never use a Blank Panel.

If you enjoy living dangerously (and editing Anvil source files outside the IDE), this also seems a potential option:

No, there’s no drawbacks to ever using Custom HTML or to never use Blank Panels. Whenever I think that later I maybe will edit the HTML, I just use a Custom HTML, even if I never edit the html or style.

However, I can’t see why I can’t change the type on the go on the editor. Now, with the new Designer it’s even “harder” to convert, since the “draw to select multiple objects” is gone and I prefer to don’t have custom html if I don’t intend to use it. It’s harder to detect and the “Find” feature don’t search in those parts of the forms, so it’s harder to find styles that may work in unintend ways.

1 Like