1 (edited by kalmav1 03/11/2019 06:56:10 am)

Topic: following the wiki Field Non Editable

trying to make banking and general ledger from budget entry 
gl_budget.php im trying to make amount not editable i already followed the step on wiki but still it won't work and editable, what did i do wrong?. im trying to make gl_budget.php amount cell into hyperlink just like po_search_completed ?

function amount_cells_ex($label, $name, $size, $max=null, $init=null, $params=null, $post_label=null, $dec=null, $readonly=false)
{
    global $Ajax;

    if (!isset($dec))
          $dec = user_price_dec();
    if (!isset($_POST[$name]) || $_POST[$name] == "")
    {
        if ($init !== null)
            $_POST[$name] = $init;
        else
            $_POST[$name] = '';
    }
    if ($label != null)
    {
        if ($params == null)
            $params = "class='label'";
        label_cell($label, $params);
    }
    if (!isset($max))
        $max = $size;

    if ($label != null)
        echo "<td>";
    else
        echo "<td align='right'>";
       

    $readonly = ($readonly) ? 'readonly' : '';
    echo "<input $readonly class='amount' type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" dec=\"$dec\" value=\"" . $_POST[$name]. "\">";

    if ($post_label) {
        echo "<span id='_{$name}_label'> $post_label</span>";
        $Ajax->addUpdate($name, '_'.$name.'_label', $post_label);
    }
    echo "</td>\n";
    $Ajax->addUpdate($name, $name, $_POST[$name]);
    $Ajax->addAssign($name, $name, 'dec', $dec);
}


function amount_cells($label, $name, $init=null, $params=null, $post_label=null, $dec=null, $readonly=false)
{
    amount_cells_ex($label, $name, 15, 15, $init, $params, $post_label, $dec, $readonly);
}


amount_cells(null, 'amount'.$i, null, 15, null, 0, true); ------> how do i make this cell into hyperlink so when they click redirect or pop up new page?.