galaxy Posted July 29, 2021 Report Share Posted July 29, 2021 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. Quote Link to comment Share on other sites More sharing options...
1 Paul Posted August 2, 2021 Report Share Posted August 2, 2021 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 Quote Link to comment Share on other sites More sharing options...
0 galaxy Posted August 3, 2021 Author Report Share Posted August 3, 2021 The Universal Module is exactly what I was looking for. I had selected the "None" module not realizing the Universal one existed and wondered how I can get custom fields. Thanks! Paul 1 Quote Link to comment Share on other sites More sharing options...
Question
galaxy
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.