Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving component configuration info as config files #192

Open
argiepiano opened this issue Oct 17, 2021 · 4 comments
Open

Saving component configuration info as config files #192

argiepiano opened this issue Oct 17, 2021 · 4 comments

Comments

@argiepiano
Copy link

Hello! I'm pretty new to webform (never used it in Drupal, always leaned toward EntityForm). I'm noticing that all the configuration information for components, conditionals and roles is saved in the database. Given the approach to saving config info as json config files in Backdrop, I'm wondering if it would be a good idea to migrate all that config info to files? I'm finding myself having to dump the database back and forth between production and development for any changes involving webform components, etc. (which often implies putting the site on maintenance to avoid changes while I'm updating things).

I know this is a big task. I may be able to help in a couple of months. I'd love to hear your thoughts. Thank you for considering.

@argiepiano argiepiano changed the title Saving component configuration info as a config files Saving component configuration info as config files Oct 17, 2021
@herbdool
Copy link
Collaborator

An interesting idea. I'm not opposed to it but it would have to be done carefully. All this configuration is per node and nodes only exist in the database, not in config. So it's possible for someone to delete a node and the configuration would be left behind. Or sync the config from staging where the node exists to live where it doesn't exist. Or, where the node ID is actually for a different content type altogether. So we'd have to think about how to deal with those cases.

@yorkshire-pudding
Copy link

@argiepiano @herbdool - please note that Webform Share provides the ability, albeit manually, to transfer webform config between environments. I've converted this module to use JSON rather than a PHP array so it may be that this could provide a basis to work from.

@stpaultim
Copy link
Member

stpaultim commented Jun 9, 2024

I'm interested in this functionality to make it possible to create a webform with a recipe.

I'll also look at how to possibly create a webform node using the install file of a module/recipe (using php).

@stpaultim
Copy link
Member

I created a recipe that creates a webform with code. If anyone is looking for code examples on how to do this.
https://github.com/backdrop-contrib/contact_us_webform_recipe

Also, there is a discussion topic in the forum:
https://forum.backdropcms.org/forum/how-create-webform-code-programmatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants