Jump to content
  • 0

Question

3 answers to this question

Recommended Posts

  • 0
Posted

I think you need to be more specific as to what you're trying to do and how and where it applies in Blesta.

 

Some simple HTML markup to accomplish what you're asking would be:

<label>
    <input type="checkbox" name="tos" value="true" />
    I agree to <a href="#">Terms & Conditions</a>
</label>
  • 0
Posted

I want to display terms and conditions in module for domain registration.

 

I have written code as following in config file.

Configure::set("domain_fields.nl",array(
    'Term' => array(
            'label' => Language::_("domain.Terms",true),
            'type' => "checkbox",
            'options' => array(
                'Yes' => Language::_("domain.RegistryTerms",true)
            )
        )
);

Currently if i write <a href="#">Terms & Conditions</a> in Language::_("domain.RegisteryTerms",true), it show as it is instead of showing it as link.

  • 0
Posted

Content is escaped when displayed, so the label attribute in the config would not be the place to include HTML. Instead, you could create a new attribute to include your custom link and language, then update the module where that field is rendered to check for those attributes and generate the HTML manually. In this case, you wouldn't be able to use ModuleFields, unless you left the label as plain-text, and set javascript that updated the plain-text to a link when the page is displayed.

 

e.g.

Configure::set("domain_fields.nl",array(
    'Term' => array(
            'label' => Language::_("domain.Terms",true),
            'type' => "checkbox",
            'options' => array(
                'Yes' => Language::_("domain.RegistryTerms",true)
            ),
            'custom_label_link' => "http://domain.com/",
            'custom_label_name' => Language::_("domain.terms", true)
        )
);

Then look for 'custom_label_link'/'custom_label_name' in your module, and make adjustments accordingly. While not identical, the Namecheap module does something similar in order to include tooltips. You can take a look at that module for reference.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...