Jump to content
  • 0

Package question


galaxy

Question

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.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...