Jump to content
  • 0

Configurable option type "text"


dany

Question

Hi Blesta Support Team,

I want to add one text field along-with domain, username, password and confirm password in add service page of cpanel module. I read your documentation regarding creating configurable options and found only four option types: radio, drop-down, checkbox and quantity

Is there any way to add text field? Can you guide me?

Link to comment
Share on other sites

21 answers to this question

Recommended Posts

  • 0

Text fields are not included for configurable options because config options affect the price, and there's no way to determine a price for a text field. Checkbox, Radio, Drop Down, and Quantity are different.

Text fields are typically used for things like domain name. These fields are specified by the module. If using the Universal Module, you may create service fields that are text fields that do not affect the price. For a domain like cPanel, an additional text field would have to be added to the module as custom code.

What is the purpose of the text field?

Link to comment
Share on other sites

  • 0
16 hours ago, dany said:

Hi Sir,

Sorry for the late reply. I wanted to add text field for retrieving script admin username and admin password for accessing admin panel of a script installation. Can you guide me how to add the same through custom code?

User/Pass for an admin panel script install, is that something the customer will provide to you? What module are you using now? If you are using the Universal Module, create another service field for it under Settings > Company > Modules > Universal Module by editing your Universal Module Product.

Link to comment
Share on other sites

  • 0

Hi Sir,

I am using cPanel module. I want to add custom fields script the user wants to install , admin username and admin password in which the user will enter the values and these will be used to install script directly as soon as cPanel account is created. How will I add the those text custom fields alongwith cPanel domain, username and password?

Link to comment
Share on other sites

  • 0

It's not possible to add another text field to cPanel, either as a config option or to the module unless you modify the module's code to add that functionality. That might be an option. The other thing you could do is create a new Package for this, using the Universal Module, and a Universal Module product with 1 or more service fields that ask the information you require. You can make the package an addon to your cPanel package, and it can have a $0.00 cost. The client will then be able to add the addon during checkout, and specify those options. It may not be as intuitive as if it were a module text field, but it should work.

Link to comment
Share on other sites

  • 0

Hi Sir,

Another issue I am facing is that I want to execute my script install function when a service is added in cPanel(i.e when cPanel account is created). For that do I have to make changes in add function of class 'services' or is there any other way with which my function will be triggered when service is added?

Link to comment
Share on other sites

  • 0
10 hours ago, dany said:

Hi Sir,

Another issue I am facing is that I want to execute my script install function when a service is added in cPanel(i.e when cPanel account is created). For that do I have to make changes in add function of class 'services' or is there any other way with which my function will be triggered when service is added?

There is a services add event (hook), see https://docs.blesta.com/display/dev/Event+Handlers but modifying the cPanel module to perform the action may be better.

Link to comment
Share on other sites

  • 0
7 hours ago, Paul said:

There is a services add event (hook), see https://docs.blesta.com/display/dev/Event+Handlers but modifying the cPanel module to perform the action may be better.

Hi Sir,

I think it will be better that I use services add event because I want the function to be triggered not only when cPanel account is created but also when Directadmin, Interworx and Plesk accounts are created.

Link to comment
Share on other sites

  • 0
On 1/24/2017 at 10:19 PM, Paul said:

It's not possible to add another text field to cPanel, either as a config option or to the module unless you modify the module's code to add that functionality. That might be an option. The other thing you could do is create a new Package for this, using the Universal Module, and a Universal Module product with 1 or more service fields that ask the information you require. You can make the package an addon to your cPanel package, and it can have a $0.00 cost. The client will then be able to add the addon during checkout, and specify those options. It may not be as intuitive as if it were a module text field, but it should work.

Hi Sir,

Another issue I am facing is that I created an addon package group as you said, installed universal module, added service options(admin username and  password), created package and added addon package in package group. I could display the service options while adding service. After creating cpanel account when I checked the parameters passed to add Service event, I didnt find the service options(admin username and  password) with values that I gave. How to get those values?Aren't they passed to add Service() event?

Link to comment
Share on other sites

  • 0

Are you using the cPanel module or the Universal module? Universal module product service fields would not be visible to the cPanel module and vice-versa. The Universal module product service fields would be available to the Universal module, and can be emailed to you, or submitted via an external API depending on how you have that product configured.

Not sure I understand exactly what you're trying to accomplish though.

Link to comment
Share on other sites

  • 0
On 2/27/2017 at 10:23 PM, Paul said:

Are you using the cPanel module or the Universal module? Universal module product service fields would not be visible to the cPanel module and vice-versa. The Universal module product service fields would be available to the Universal module, and can be emailed to you, or submitted via an external API depending on how you have that product configured.

Not sure I understand exactly what you're trying to accomplish though.

Hi Sir,

I wanted to create extra fields like script user wants to install, admin username and admin password alongwith cPanel service options (i.e domain name, username and password) which will be displayed while adding service(creating cPanel account). I could create 'script user wants to install' field using configurable options. It seems that Universal Module wont serve my purpose of adding and passing the values of text fields admin username and password while adding service for cPanel module. So now what should be done in order to display them (i.e admin username and password) so that I can retrieve and pass its values to my autoinstall script?

Link to comment
Share on other sites

  • 0

To request text fields like username/password you'd need to either use the universal module or probably preferably create a new module that can integrate with your auto install script. The issue is that it would have to be ordered as an addon to your cPanel service, because cPanel uses the cPanel module for provisioning.

If you want it to be apart of the same service during checkout, you'd have to modify the cPanel module to add these additional fields, and then perform an additional API call within the cPanel module to your auto install script. That's all possible to do. If you need help, check out https://www.blesta.com/development/ 

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