Jump to content

Question

Posted

I would like to create a package for services that require a username & password.  For example, a mailbox.

What is the correct method to create service fields to hold things like email_address, username, password, etc. ?

Would that be configurable options?  I want to make sure its not an "option" but something that is required, and be able to do validation on it.

2 answers to this question

Recommended Posts

  • 1
Posted
On 7/29/2021 at 3:13 PM, galaxy said:

I would like to create a package for services that require a username & password.  For example, a mailbox.

What is the correct method to create service fields to hold things like email_address, username, password, etc. ?

Would that be configurable options?  I want to make sure its not an "option" but something that is required, and be able to do validation on it.

This depends whether you are creating your own module, or using the Universal Module. For the Universal module, we recommend creating any fields that will not cost extra (like username, password, etc) as a service field on the product. See https://docs.blesta.com/display/user/Universal+Module#UniversalModule-ServiceOptions for docs and an example.

For any fields that should cost extra, those should be created as Configurable Options, under Packages > Configurable Options.

If you are creating your own module, then you would code in the service fields. The Extension Generator plugin can help you get started with development, and I believe it lets you define these fields https://docs.blesta.com/display/user/Extension+Generator

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...