By hoppurr on
excuse me if this has been asked before, but is there any way to create a .install file for a module that has forms that need to be filled out at time of module install? or is the task of preconfiguring a module installation going to have to be done by a .config file of some sort
Comments
You can save whatever
You can save whatever information you need to the database in hook_install(). Save your form data then.
Contact me to contract me for D7 -> D10/11 migrations.
ok, but can it present forms
ok, but can it present forms to the user?
Why don't you explain a
Why don't you explain a little more about what you want to do.
Contact me to contract me for D7 -> D10/11 migrations.
fair enough i'm creating a
fair enough
i'm creating a module pack that will define a set of content types, views, and vocabularies, however the number and names of these will vary based on the site i'm installing them on so i'm hoping to do some pre-configuration of the module to define these at install time of the module
I get what you are saying.
I get what you are saying. Look into installation profiles.
Contact me to contract me for D7 -> D10/11 migrations.
perhaps, but i'm looking to
perhaps, but i'm looking to install this module on existing drupal sites, install profiles as best as i understand are for new drupal installs.
They are. There isn't
They are.
There isn't currently a mechanism in place for a module installation profile. You *could* force the user to the settings page using a redirect in hook_init(), but that's bad practice as they may not be ready to do the settings page.
Many modules have a message that shows up until settings have been configured. Maybe this could work for you.
Contact me to contract me for D7 -> D10/11 migrations.