1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

How does the button work?

Discussion in 'Professional Support' started by p38, Jan 28, 2013.

  1. p38

    p38 Active Member

    Level: Community
    I cannot see any options for the button, so would like to know how I can use this in a list view?

    Can I use it to hyperlink to the URL stored in the element record?
     
  2. jfquestiaux

    jfquestiaux Well-Known Member

    Level: Community
    I am not sure whay you mean with your hyperlink, but regarding the button, I think the only thiing you can do is to associate a Javascript to it (in the JS tab).
     
  3. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Correct.

    So yes, you could use it to hyperlink to the value of another element. The button element itself has no "value".

    So you might do something like this, to get a URL fromanother element called some_element ...

    var url = form_123.formElements.get('yourtable___some_element').getValue;
    window.location.replace(url);

    ... or window.open(url) to open it in a new window/tab.

    -- hugh
     
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Correct.

    So yes, you could use it to hyperlink to the value of another element. The button element itself has no "value".

    So you might do something like this, to get a URL fromanother element called some_element ...

    var url = form_123.formElements.get('yourtable___some_element').getValue;
    window.location.replace(url);

    ... or window.open(url) to open it in a new window/tab.

    -- hugh
     
    1 person likes this.
  5. skyrun

    skyrun Active Member

    Level: Community
    note to anyone reading this for f3.1. you'll need to use:
    Fabrik.getBlock('form_123').formElements.get('yourtable___some_element').getValue();

    and i think everyone may need a () on the end of getValue...
     
    rob likes this.
  6. rob

    rob Administrator Staff Member

    Level: Community
    thanks Barry :) - you are completely correct :)
     

Share This Page