Is there a way to add note with link to form ui component. I have try ui way below but it doesn't work
Ui way

<field name="fieldname">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Field Label</item>
                <item name="formElement" xsi:type="string">select</item>
                <item name="notice" xsi:type="string"><![CDATA[<a href="https://yourlink" target="_blank">here</a>]]></item>

Old way to add note

$this->addField("fieldname", [
    'label'  => __('Field Label'),
    'type'   => 'select',
    'note'   => __('<a href="https://yourlink" target="_blank">here</a>')

Is possible to do old way in ui way

  • W/o CDATA it's working fine? – Ankit Shah Nov 1 '16 at 6:15
  • No It not work with me! I can't click on link in form – mrtuvn Nov 1 '16 at 6:30
  • Can u please give frontend screenshot via Inspect Element how it's displaying @mrtuvn. Please try with <comment>YOUR URL</comment> as well – Ankit Shah Nov 1 '16 at 6:40
  • <comment> work in config/system but not work in form. I have tried add cdata but it not translate to link , only text – mrtuvn Nov 1 '16 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.