Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » using Popup on outer table of MULTI4
using Popup on outer table of MULTI4 [message #1142] Thu, 25 October 2007 13:13 Go to next message
alrobertson is currently offline  alrobertson
Messages: 9
Registered: October 2007
Location: Vancouver
Junior Member
When I use a popup for a field in the outer table of a MULTI4,
the outer table's popcall() function does not get called but the inner tables popupcall() function gets called instead.

I made a small change to childForm() to get me by. I added
$found_x = true; to the conditional where _x$ is being stripped off. Then added this code after the 'popup|filepicker' has been determined:

if (($pattern_id == 'MULTI4') AND ($found_x)) {
reset($object_array);
$objectname = key($object_array);
$dbobject = $object_array[$objectname];
}

I'm sure you will have a better way, but I thought I should let you know about the issue.

Thanks
Re: using Popup on outer table of MULTI4 [message #1143 is a reply to message #1142] Thu, 25 October 2007 18:13 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2350
Registered: April 2006
Location: Surrey, UK
Senior Member
Here is the fix which I have just tested. Within function childForm() in file include.session.inc change
    if (is_array($value)) {
        $offset = key($value);
    } else {
        $offset = 1;
    } // if
to
    if (is_array($value)) {
        $offset = key($value);
    } else {
        $offset = 1;
        if (count($object_array) > 1) {
            // set to previous entry in array
            $null       = prev($object_array);
            $objectname = key($object_array);
            $dbobject   = $object_array[$objectname];
        } // if
    } // if

Let me know if this works for you and I shall include it in the next release.


Re: using Popup on outer table of MULTI4 [message #1144 is a reply to message #1143] Thu, 25 October 2007 18:53 Go to previous message
AJM is currently offline  AJM
Messages: 2350
Registered: April 2006
Location: Surrey, UK
Senior Member
After more testing I found a problem with my previous fix, so I've had another go at it. Try the attached file and see if that works.

Previous Topic: dict_table_s03
Next Topic: getInitialDataMultiple does not deal with ') OR (' in $where parameter
Goto Forum:
  


Current Time: Mon Jun 24 10:01:51 EDT 2024

Total time taken to generate the page: 0.00861 seconds