BUG 6828 "Request that the address and label of link fields in..." SOLVED

- New feature
- Request that the address and label of link fields in DynaForms can be
  set and saved using case variables
- Populate links in a grid via trigger
- Added this new funcionality
- Take into account the following (examples):
    > Triggers
        * Populate a link field
            @@MyLink = "http://www.php.net";
            @@MyLink_label = "Read about PHP";

        * Populate links in a grid
            @=MYGRID = array();
            $i = 1;

            $rs = $stmt->executeQuery("SELECT USR_USERNAME FROM USERS", ResultSet::FETCHMODE_ASSOC);

            while ($rs->next()) {
                $row = $rs->getRow();

                @=MYGRID[$i] = array(
                    "MyField" => $row["USR_USERNAME"],
                    "MyLink" => "http://www.php.net",
                    "MyLink_label" => "Read about PHP, $i"
                );

                $i = $i + 1;
            }
    > JavaScript, populate a link field:
        getField("MyLink").href = "http://www.php.net";
        getField("MyLink").innerHTML = "Read about PHP";
* Available from version 2.0.46
This commit is contained in:
Victor Saisa Lopez
2012-11-22 17:50:52 -04:00
parent 349717092d
commit 1851b43d5b
5 changed files with 160 additions and 47 deletions

View File

@@ -387,10 +387,10 @@ function getDynaformsVars ($sProcessUID, $bSystemVars = true, $bIncMulSelFields
$aFields[] = array ('sName' => 'PIN','sType' => 'system','sLabel' => 'System variable'
);
}
$aInvalidTypes = array ('title','subtitle','link','file','button','reset','submit','javascript'
);
$aMultipleSelectionFields = array ('listbox','checkgroup','grid'
);
$aInvalidTypes = array("title", "subtitle", "file", "button", "reset", "submit", "javascript");
$aMultipleSelectionFields = array("listbox", "checkgroup", "grid");
if ($bIncMulSelFields != 0) {
$aInvalidTypes = array_merge( $aInvalidTypes, $aMultipleSelectionFields );
}