sweta.tests Posted October 6, 2014 Report Posted October 6, 2014 I wan to add extra fields for domain registration. For that i am using as follow 'OtherEntityType' => array( 'label' => Language::_("OtherEntityType",true), 'type' => 'text' ) Is there way by which I can show note(tooltip) below textbox or something like that. Purpose behind this is I want to inform user about when to use this field. Quote
0 flangefrog Posted October 6, 2014 Report Posted October 6, 2014 You can show a tooltip or placeholder. 'OtherEntityType' => array( 'label' => Language::_("OtherEntityType", true), 'type' => 'text', 'attributes' => array( 'title' => "Tooltip", 'placeholder' => "Placeholder" ) ) Quote
0 sweta.tests Posted October 6, 2014 Author Report Posted October 6, 2014 You can show a tooltip or placeholder. 'OtherEntityType' => array( 'label' => Language::_("OtherEntityType", true), 'type' => 'text', 'attributes' => array( 'title' => "Tooltip", 'placeholder' => "Placeholder" ) ) placeholder is working but tooltip is not working Quote
0 Blesta Addons Posted October 6, 2014 Report Posted October 6, 2014 Change the title to tooltip in the above code . Quote
0 Blesta Addons Posted October 6, 2014 Report Posted October 6, 2014 But the title is not a tooltip . he need tooltip . Quote
0 flangefrog Posted October 6, 2014 Report Posted October 6, 2014 The Module::arrayToModuleFields() method uses the attribute array to set the HTML attributes directly, so for a tooltip you would need to set the HTML title attribute http://www.w3.org/html/wg/drafts/html/master/dom.html#the-title-attribute Quote
0 Blesta Addons Posted October 6, 2014 Report Posted October 6, 2014 The OP need I think a popup div . the tooltip is not a title , you can style the tooltip the way you want via CSS . Blesta handle the tooltip attribute , you can chech some module that already has tooltip . i can't give example now as I'm connected with phone . Quote
0 Blesta Addons Posted October 6, 2014 Report Posted October 6, 2014 can you try this 'OtherEntityType' => array( 'label' => Language::_("OtherEntityType",true), 'type' => 'text' ) 'OtherEntityTypetooltip' => array( 'label' => "This Is a tooltip", 'type' => 'tooltip' ) Quote
0 sweta.tests Posted October 7, 2014 Author Report Posted October 7, 2014 can you try this 'OtherEntityType' => array( 'label' => Language::_("OtherEntityType",true), 'type' => 'text' ) 'OtherEntityTypetooltip' => array( 'label' => "This Is a tooltip", 'type' => 'tooltip' ) Not working. giving me error Call to undefined method ModuleFields::fieldTooltip() Quote
0 Blesta Addons Posted October 7, 2014 Report Posted October 7, 2014 in wich function you add the code ? tooltip is declared type http://source-docs.blesta.com/class-ModuleFields.html what i do for tooltip in my modules, i add them inside the view pdt file like <li> <?php $this->Form->label($this->_("Mymodule.row_meta.panel_link", true), "panel_link"); $this->Form->fieldText("panel_link", $this->Html->ifSet($vars->panel_link), array('id' => "panel_link")); ?> <span class="tooltip"><?php $this->_("AppController.tooltip.text");?><div><?php $this->_("Mymodule.!tooltip.panel_link");?></div></span> </li> if i want to add it directly to the module file i do : // Create field $field_id = $fields->label(Language::_("Mymodule.field_id", true), "field_id"); $field_id->attach($fields->fieldText("field_id", $this->Html->ifSet($vars->field_id), array('id'=>"field_id"))); // Add tooltip $tooltip = $fields->tooltip(Language::_("Mymodule.field_id.tooltip", true)); $field_id->attach($tooltip); // Set the label as a field $fields->setField($field_id); Michael 1 Quote
0 sweta.tests Posted October 8, 2014 Author Report Posted October 8, 2014 I have created one config file and added code in that file. Configure::set("domain_fields.us", array( 'OtherEntityType' => array( 'label' => Language::_("OtherEntityType",true), 'type' => 'text' ) ) Quote
0 Blesta Addons Posted October 8, 2014 Report Posted October 8, 2014 i think it support just the form input (text, hidden, textarea, select, multiselect ...) Quote
Question
sweta.tests
I wan to add extra fields for domain registration. For that i am using as follow
Is there way by which I can show note(tooltip) below textbox or something like that. Purpose behind this is I want to inform user about when to use this field.
12 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.