0

I want to add a custom configuration form to my module; I don't know if making a custom schema is better or if I should make a standalone field and use its different field APIs to deal with the value.

Can I create a standalone field with no entity or bundle? If I can't, what would be the alternatives?

  • Every entity has at least one bundle, and every field requires an entity to attach to. You can "fake it" with a dummy entity to get all field API fields out on normal form API form, but it's messy. See drupal.stackexchange.com/questions/25140/… – Clive Oct 26 '15 at 16:12
1

Take a look at system_settings_form and how it is used by other modules to create a basic form and field for module configuration. It'll generally use variable_get and variable_set to get and store it's value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.