Jump to content

Question

Posted

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.

12 answers to this question

Recommended Posts

  • 0
Posted

You can show a tooltip or placeholder.

'OtherEntityType' => array(
	'label' => Language::_("OtherEntityType", true),
	'type' => 'text',
	'attributes' => array(
		'title' => "Tooltip",
		'placeholder' => "Placeholder"
	)
)
  • 0
Posted

 

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

  • 0
Posted

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 .

  • 0
Posted

can you try this

'OtherEntityType' => array(
         'label' => Language::_("OtherEntityType",true),
         'type' => 'text'
     )
'OtherEntityTypetooltip' => array(
         'label' => "This Is a tooltip",
         'type' => 'tooltip'
     )
  • 0
Posted

 

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()

  • 0
Posted

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);

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