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

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...