Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Linking to page from ComplexTableField - possible?

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 5596 Views
  • a-tech
    Avatar
    Community Member
    39 Posts

    Re: Linking to page from ComplexTableField - possible? Link to this post

    Thanks again ingo - after posting I make a hack in the complextablefield.js file which helped, but I will try blocking it and see if that acheives the same result without affecting too much else.

  • Ney
    Avatar
    Community Member
    8 Posts

    Re: Linking to page from ComplexTableField - possible? Link to this post

    Hello, I would like to know if u solve this problem with popups and how? I have the same problem when I want to load window different to a popup I would thank u if u can help

  • ScottiouS
    Avatar
    Community Member
    54 Posts

    Re: Linking to page from ComplexTableField - possible? Link to this post

    I dealt with this problem like so:

    The javascript that's hogging the <a> tags in the table ignores an element if it's an input tag.

    So I've used the following to bypass the popup:

       $orderReport->setFieldFormatting(array(
                'Invoice' => '<input type=\"button\" name=\"OrderReport_Popup/index/$ID/\" onclick=\"location.href=this.name;\" value=\"Invoice\" />'));

    Again messy code to deal with the popups but, I hope that helps.

  • ScottiouS
    Avatar
    Community Member
    54 Posts

    Re: Linking to page from ComplexTableField - possible? Link to this post

    Also further on this I don't know why I didn't just put:

    $orderReport->setFieldFormatting(array(
    'Invoice' => '<input type=\"button\" onclick=\"location.href=\'OrderReport_Popup/index/$ID/\';\" value=\"Invoice\" />'));

    What was I thinking?

    5596 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.