<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Auto Fill List of Values in a Text Input Fields]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7207&amp;type=atom" />
	<updated>2017-12-25T10:06:33Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7207</id>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30281#p30281" />
			<content type="html"><![CDATA[<p>@boxygen: nice corollary.<br />@joe: can commit.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-12-25T10:06:33Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30281#p30281</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30280#p30280" />
			<content type="html"><![CDATA[<p>Now I think in <strong>core</strong> dimension_entry.php Lines from 149-167 shall be updated with below</p><div class="codebox"><pre><code>$Ajax-&gt;activate(&#039;_page_body&#039;);
    if (can_process())
    {

        if ($selected_id == -1)
        {
            $id = add_dimension($_POST[&#039;ref&#039;], $_POST[&#039;name&#039;], $_POST[&#039;type_&#039;], $_POST[&#039;date_&#039;], $_POST[&#039;due_date&#039;], $_POST[&#039;memo_&#039;]);
            add_tag_associations($id, $_POST[&#039;dimension_tags&#039;]);
            meta_forward($_SERVER[&#039;PHP_SELF&#039;], &quot;AddedID=$id&quot;,0,true);
        }
        else
        {

            update_dimension($selected_id, $_POST[&#039;name&#039;], $_POST[&#039;type_&#039;], $_POST[&#039;date_&#039;], $_POST[&#039;due_date&#039;], $_POST[&#039;memo_&#039;]);
            update_tag_associations(TAG_DIMENSION, $selected_id, $_POST[&#039;dimension_tags&#039;]);

            meta_forward($_SERVER[&#039;PHP_SELF&#039;], &quot;UpdatedID=$selected_id&quot;,0,true);
        }
    }</code></pre></div>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2017-12-25T08:00:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30280#p30280</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30270#p30270" />
			<content type="html"><![CDATA[<p>Great Friends, Great Team </p><p>I thank you all for your contributions. </p><p>Joe is Comitter and I am Bugger <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2017-12-24T12:51:37Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30270#p30270</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30265#p30265" />
			<content type="html"><![CDATA[<p>Then @boxygen&#039;s <strong>dimension_entry.php</strong> would now be <br /></p><div class="codebox"><pre><code>&lt;?php
/**********************************************************************
    Copyright (C) FrontAccounting, LLC.
    Released under the terms of the GNU General Public License, GPL,
    as published by the Free Software Foundation, either version 3
    of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    See the License here &lt;http://www.gnu.org/licenses/gpl-3.0.html&gt;.
***********************************************************************/
$page_security = &#039;SA_DIMENSION&#039;;
$path_to_root = &quot;../..&quot;;

include_once ($path_to_root . &quot;/includes/session.inc&quot;);
include_once ($path_to_root . &quot;/includes/date_functions.inc&quot;);
include_once ($path_to_root . &quot;/includes/data_checks.inc&quot;);
include_once ($path_to_root . &quot;/admin/db/tags_db.inc&quot;);
include_once ($path_to_root . &quot;/dimensions/includes/dimensions_db.inc&quot;);
include_once ($path_to_root . &quot;/modules/clearing/includes/dim_db.inc&quot;);
include_once ($path_to_root . &quot;/modules/clearing/includes/dimensions_ui.inc&quot;);

$js = &quot;&quot;;
if (user_use_date_picker())
    $js.= get_js_date_picker();
page(_($help_context = &quot;Dimension Entry&quot;) , false, false, &quot;&quot;, $js);
// ---------------------------------------------------------------------------------------
if (isset($_GET[&#039;trans_no&#039;]))
    $selected_id = $_GET[&#039;trans_no&#039;];
elseif (isset($_POST[&#039;selected_id&#039;]))
    $selected_id = $_POST[&#039;selected_id&#039;];
else $selected_id = - 1;
// ---------------------------------------------------------------------------------------
if (isset($_GET[&#039;AddedID&#039;])) {
    $id = $_GET[&#039;AddedID&#039;];
    display_notification_centered(_(&quot;The dimension has been entered.&quot;));
    safe_exit();
}
// ---------------------------------------------------------------------------------------
if (isset($_GET[&#039;UpdatedID&#039;])) {
    $id = $_GET[&#039;UpdatedID&#039;];
    display_notification_centered(_(&quot;The dimension has been updated.&quot;));
    safe_exit();
}
// ---------------------------------------------------------------------------------------
if (isset($_GET[&#039;DeletedID&#039;])) {
    $id = $_GET[&#039;DeletedID&#039;];
    display_notification_centered(_(&quot;The dimension has been deleted.&quot;));
    safe_exit();
}
// ---------------------------------------------------------------------------------------
if (isset($_GET[&#039;ClosedID&#039;])) {
    $id = $_GET[&#039;ClosedID&#039;];
    display_notification_centered(_(&quot;The dimension has been closed. There can be no more changes to it.&quot;) . &quot; #$id&quot;);
    safe_exit();
}
// ---------------------------------------------------------------------------------------
if (isset($_GET[&#039;ReopenedID&#039;])) {
    $id = $_GET[&#039;ReopenedID&#039;];
    display_notification_centered(_(&quot;The dimension has been re-opened. &quot;) . &quot; #$id&quot;);
    safe_exit();
}
// -------------------------------------------------------------------------------------------------
function safe_exit() {
    global $path_to_root;
    hyperlink_no_params(&quot;&quot;, _(&quot;Enter a &amp;new dimension&quot;));
    echo &quot;&lt;br /&gt;&quot;;
    hyperlink_no_params($path_to_root . &quot;/modules/clearing/inquiry/search_dimensions.php&quot;, _(&quot;&amp;Select an existing dimension&quot;));
    display_footer_exit();
}
// -------------------------------------------------------------------------------------
function can_process() {
    global $selected_id, $Refs;
    if ($selected_id == - 1) {
        if (!check_reference($_POST[&#039;ref&#039;], ST_DIMENSION)) {
            set_focus(&#039;ref&#039;);
            return false;
        }
    }
    if (strlen($_POST[&#039;name&#039;]) == 0) {
        display_error(_(&quot;The dimension name must be entered.&quot;));
        set_focus(&#039;name&#039;);
        return false;
    }
    if (!is_date($_POST[&#039;date_&#039;])) {
        display_error(_(&quot;The date entered is in an invalid format.&quot;));
        set_focus(&#039;date_&#039;);
        return false;
    }
    if (!is_date($_POST[&#039;due_date&#039;])) {
        display_error(_(&quot;The required by date entered is in an invalid format.&quot;));
        set_focus(&#039;due_date&#039;);
        return false;
    }
    return true;
}
// -------------------------------------------------------------------------------------
if (isset($_POST[&#039;ADD_ITEM&#039;]) || isset($_POST[&#039;UPDATE_ITEM&#039;]))
{
    if (!isset($_POST[&#039;dimension_tags&#039;])) $_POST[&#039;dimension_tags&#039;] = array();
    $Ajax-&gt;activate(&#039;_page_body&#039;);
    if (can_process())
    {
        if ($selected_id == - 1)
        {
            $id = add_dim($_POST[&#039;ref&#039;], $_POST[&#039;name&#039;], $_POST[&#039;type_&#039;], $_POST[&#039;date_&#039;], $_POST[&#039;due_date&#039;], $_POST[&#039;memo_&#039;], $_POST[&#039;client&#039;], $_POST[&#039;item&#039;], $_POST[&#039;POL&#039;], $_POST[&#039;mode&#039;], $_POST[&#039;volume&#039;], $_POST[&#039;weight&#039;], $_POST[&#039;cont_no&#039;], $_POST[&#039;equip_no&#039;], $_POST[&#039;bl_no&#039;], $_POST[&#039;bl_date&#039;], $_POST[&#039;ETA&#039;], $_POST[&#039;doc_copy&#039;], $_POST[&#039;doc_org&#039;], $_POST[&#039;gd_date&#039;], $_POST[&#039;po_duty&#039;], $_POST[&#039;po_do&#039;], $_POST[&#039;po_wfg&#039;], $_POST[&#039;destuff&#039;], $_POST[&#039;assessment&#039;], $_POST[&#039;delivery&#039;], $_POST[&#039;gd_no&#039;], $_POST[&#039;igm_no&#039;], $_POST[&#039;igm_date&#039;], $_POST[&#039;index_no&#039;], $_POST[&#039;cash_no&#039;], $_POST[&#039;cash_date&#039;], $_POST[&#039;value&#039;], $_POST[&#039;no_of_pkg&#039;], $_POST[&#039;POD&#039;], $_POST[&#039;gross_weight&#039;]);
            add_tag_associations($id, $_POST[&#039;dimension_tags&#039;]);
            meta_forward($_SERVER[&#039;PHP_SELF&#039;], &quot;AddedID=$id&quot;, 0, true);
        }
        else
        {
            update_dim($selected_id, $_POST[&#039;Dref&#039;], $_POST[&#039;name&#039;], $_POST[&#039;type_&#039;], $_POST[&#039;date_&#039;], $_POST[&#039;due_date&#039;], $_POST[&#039;memo_&#039;], $_POST[&#039;client&#039;], $_POST[&#039;item&#039;], $_POST[&#039;POL&#039;], $_POST[&#039;mode&#039;], $_POST[&#039;volume&#039;], $_POST[&#039;weight&#039;], $_POST[&#039;cont_no&#039;], $_POST[&#039;equip_no&#039;], $_POST[&#039;bl_no&#039;], $_POST[&#039;bl_date&#039;], $_POST[&#039;ETA&#039;], $_POST[&#039;doc_copy&#039;], $_POST[&#039;doc_org&#039;], $_POST[&#039;gd_date&#039;], $_POST[&#039;po_duty&#039;], $_POST[&#039;po_do&#039;], $_POST[&#039;po_wfg&#039;], $_POST[&#039;destuff&#039;], $_POST[&#039;assessment&#039;], $_POST[&#039;delivery&#039;], $_POST[&#039;gd_no&#039;], $_POST[&#039;igm_no&#039;], $_POST[&#039;igm_date&#039;], $_POST[&#039;index_no&#039;], $_POST[&#039;cash_no&#039;], $_POST[&#039;cash_date&#039;], $_POST[&#039;value&#039;], $_POST[&#039;no_of_pkg&#039;], $_POST[&#039;POD&#039;], $_POST[&#039;gross_weight&#039;]);
            update_tag_associations(TAG_DIMENSION, $selected_id, $_POST[&#039;dimension_tags&#039;]);
            meta_forward($_SERVER[&#039;PHP_SELF&#039;], &quot;UpdatedID=$selected_id&quot;, 0, true);
        }
    }
}
// --------------------------------------------------------------------------------------
if (isset($_POST[&#039;delete&#039;])) {
    $cancel_delete = false;
    // can&#039;t delete it there are productions or issues
    if (dimension_has_payments($selected_id) || dimension_has_deposits($selected_id))     {
        display_error(_(&quot;This dimension cannot be deleted because it has already been processed.&quot;));
        set_focus(&#039;ref&#039;);
        $cancel_delete = true;
    }
    if ($cancel_delete == false)     { //ie not cancelled the delete as a result of above tests
        // delete
        delete_dimension($selected_id);
        delete_tag_associations(TAG_DIMENSION, $selected_id, true);
        meta_forward($_SERVER[&#039;PHP_SELF&#039;], &quot;DeletedID=$selected_id&quot;);
    }
}
// -------------------------------------------------------------------------------------
if (isset($_POST[&#039;close&#039;])) {
    // update the closed flag
    close_dimension($selected_id);
    meta_forward($_SERVER[&#039;PHP_SELF&#039;], &quot;ClosedID=$selected_id&quot;);
}
if (isset($_POST[&#039;reopen&#039;])) {
    // update the closed flag
    reopen_dimension($selected_id);
    meta_forward($_SERVER[&#039;PHP_SELF&#039;], &quot;ReopenedID=$selected_id&quot;);
}
// -------------------------------------------------------------------------------------
start_form();
start_outer_table(TABLESTYLE2);
table_section(1);
if ($selected_id != - 1) {
    $myrow = get_dimension($selected_id);
    if (strlen($myrow[0]) == 0)
    {
        display_error(_(&quot;The dimension sent is not valid.&quot;));
        display_footer_exit();
    }
    // if it&#039;s a closed dimension can&#039;t edit it
    // if ($myrow[&quot;closed&quot;] == 1)
    // {
    //    display_error(_(&quot;This dimension is closed and cannot be edited.&quot;));
    //    display_footer_exit();
    // }
    $_POST[&#039;ref&#039;] = $myrow[&quot;reference&quot;];
    $_POST[&#039;closed&#039;] = $myrow[&quot;closed&quot;];
    $_POST[&#039;name&#039;] = $myrow[&quot;name&quot;];
    $_POST[&#039;type_&#039;] = $myrow[&quot;type_&quot;];
    $_POST[&#039;date_&#039;] = sql2date($myrow[&quot;date_&quot;]);
    $_POST[&#039;due_date&#039;] = sql2date($myrow[&quot;due_date&quot;]);
    $_POST[&#039;memo_&#039;] = get_comments_string(ST_DIMENSION, $selected_id);
    $tags_result = get_tags_associated_with_record(TAG_DIMENSION, $selected_id);
    $tagids = array();
    while ($tag = db_fetch($tags_result)) $tagids[] = $tag[&#039;id&#039;];
    $_POST[&#039;dimension_tags&#039;] = $tagids;
    hidden(&#039;ref&#039;, $_POST[&#039;ref&#039;]);
    // label_row(_(&quot;Dimension Reference:&quot;), $_POST[&#039;ref&#039;]); //Commented By Faisal
    ref_row(_(&quot;Dimension Reference:&quot;) , &#039;Dref&#039;, &#039;&#039;, $_POST[&#039;ref&#039;]); //added by faisal
    hidden(&#039;selected_id&#039;, $selected_id);
} else {
    $_POST[&#039;dimension_tags&#039;] = array();
    ref_row(_(&quot;Dimension Reference:&quot;) , &#039;ref&#039;, &#039;&#039;, $Refs-&gt;get_next(ST_DIMENSION) , false, ST_DIMENSION);
}
text_row_ex(_(&quot;Name&quot;) . &quot;:&quot;, &#039;name&#039;, 25, 75);
$dim = get_company_pref(&#039;use_dimension&#039;);
number_list_row(_(&quot;Type&quot;) , &#039;type_&#039;, null, 1, $dim);
date_row(_(&quot;Start Date&quot;) . &quot;:&quot;, &#039;date_&#039;);
date_row(_(&quot;Date Required By&quot;) . &quot;:&quot;, &#039;due_date&#039;, &#039;&#039;, null, $SysPrefs-&gt;default_dimension_required_by());
tag_list_row(_(&quot;Tags:&quot;) , &#039;dimension_tags&#039;, 5, TAG_DIMENSION, true);
textarea_row(_(&quot;Memo:&quot;) , &#039;memo_&#039;, null, 40, 5);
text_row(_(&quot;Client&quot;) . &quot;:&quot;, &#039;client&#039;, @$myrow[&#039;client&#039;], 25, 75);
text_row(_(&quot;Item&quot;) . &quot;:&quot;, &#039;item&#039;, @$myrow[&#039;item&#039;], 25, 75);
table_section(2);
text_row(_(&quot;POL&quot;) . &quot;:&quot;, &#039;POL&#039;, @$myrow[&#039;POL&#039;], 25, 75);
text_row(_(&quot;Mode&quot;) . &quot;:&quot;, &#039;mode&#039;, @$myrow[&#039;mode&#039;], 25, 75);
text_row(_(&quot;Volume&quot;) . &quot;:&quot;, &#039;volume&#039;, @$myrow[&#039;volume&#039;], 25, 75);
text_row(_(&quot;Weight&quot;) . &quot;:&quot;, &#039;weight&#039;, @$myrow[&#039;weight&#039;], 25, 75);
text_row(_(&quot;Container No&quot;) . &quot;:&quot;, &#039;cont_no&#039;, @$myrow[&#039;cont_no&#039;], 25, 75);
text_row(_(&quot;Equipment NO&quot;) . &quot;:&quot;, &#039;equip_no&#039;, @$myrow[&#039;equip_no&#039;], 25, 75);
text_row(_(&quot;BL No&quot;) . &quot;:&quot;, &#039;bl_no&#039;, @$myrow[&#039;bl_no&#039;], 25, 75);
text_row(_(&quot;BL Date&quot;) . &quot;:&quot;, &#039;bl_date&#039;, @$myrow[&#039;bl_date&#039;], 25, 75);
text_row(_(&quot;ETA&quot;) . &quot;:&quot;, &#039;ETA&#039;, @$myrow[&#039;ETA&#039;], 25, 75);
table_section(3);
text_row(_(&quot;Doc Copy&quot;) . &quot;:&quot;, &#039;doc_copy&#039;, @$myrow[&#039;doc_copy&#039;], 25, 75);
text_row(_(&quot;Doc Original&quot;) . &quot;:&quot;, &#039;doc_org&#039;, @$myrow[&#039;doc_org&#039;], 25, 75);
text_row(_(&quot;GD Date&quot;) . &quot;:&quot;, &#039;gd_date&#039;, @$myrow[&#039;gd_date&#039;], 25, 75);
text_row(_(&quot;Duty POrder&quot;) . &quot;:&quot;, &#039;po_duty&#039;, @$myrow[&#039;po_duty&#039;], 25, 75);
text_row(_(&quot;DO POrder&quot;) . &quot;:&quot;, &#039;po_do&#039;, @$myrow[&#039;po_do&#039;], 25, 75);
text_row(_(&quot;Wharfage POrder&quot;) . &quot;:&quot;, &#039;po_wfg&#039;, @$myrow[&#039;po_wfg&#039;], 25, 75);
text_row(_(&quot;Destuff Date&quot;) . &quot;:&quot;, &#039;destuff&#039;, @$myrow[&#039;destuff&#039;], 25, 75);
text_row(_(&quot;Assessment Date&quot;) . &quot;:&quot;, &#039;assessment&#039;, @$myrow[&#039;assessment&#039;], 25, 75);
text_row(_(&quot;Delivery Date&quot;) . &quot;:&quot;, &#039;delivery&#039;, @$myrow[&#039;delivery&#039;], 25, 75);
text_row(_(&quot;GD Number&quot;) . &quot;:&quot;, &#039;gd_no&#039;, @$myrow[&#039;gd_no&#039;], 25, 75);
table_section(4);
text_row(_(&quot;IGM Number&quot;) . &quot;:&quot;, &#039;igm_no&#039;, @$myrow[&#039;igm_no&#039;], 25, 75);
text_row(_(&quot;IGM Date&quot;) . &quot;:&quot;, &#039;igm_date&#039;, @$myrow[&#039;igm_date&#039;], 25, 75);
text_row(_(&quot;Index Number&quot;) . &quot;:&quot;, &#039;index_no&#039;, @$myrow[&#039;index_no&#039;], 25, 75);
text_row(_(&quot;Cash Number&quot;) . &quot;:&quot;, &#039;cash_no&#039;, @$myrow[&#039;cash_no&#039;], 25, 75);
text_row(_(&quot;Cash Date&quot;) . &quot;:&quot;, &#039;cash_date&#039;, @$myrow[&#039;cash_date&#039;], 25, 75);
text_row(_(&quot;Value&quot;) . &quot;:&quot;, &#039;value&#039;, @$myrow[&#039;value&#039;], 25, 75);
text_row(_(&quot;No Of Pkg&quot;) . &quot;:&quot;, &#039;no_of_pkg&#039;, @$myrow[&#039;no_of_pkg&#039;], 25, 75);
text_row(_(&quot;POD&quot;) . &quot;:&quot;, &#039;POD&#039;, @$myrow[&#039;POD&#039;], 25, 75);
text_row(_(&quot;Gross Weight&quot;) . &quot;:&quot;, &#039;gross_weight&#039;, @$myrow[&#039;gross_weight&#039;], 25, 75);
end_outer_table(1);
if (isset($_POST[&#039;closed&#039;]) &amp;&amp; $_POST[&#039;closed&#039;] == 1)
    display_note(_(&quot;This Dimension is closed.&quot;) , 0, 0, &quot;class=&#039;currentfg&#039;&quot;);
if ($selected_id != - 1)
{
    echo &quot;&lt;br /&gt;&quot;;
    submit_center_first(&#039;UPDATE_ITEM&#039;, _(&quot;Update&quot;) , _(&#039;Save changes to dimension&#039;) , &#039;default&#039;);
    if ($_POST[&#039;closed&#039;] == 1)
        submit(&#039;reopen&#039;, _(&quot;Re-open This Dimension&quot;) , true, _(&#039;Mark this dimension as re-opened&#039;) , true);
    else
        submit(&#039;close&#039;, _(&quot;Close This Dimension&quot;) , true, _(&#039;Mark this dimension as closed&#039;) , true);
    submit_center_last(&#039;delete&#039;, _(&quot;Delete This Dimension&quot;) , _(&#039;Delete unused dimension&#039;) , true);
} else {
    submit_center(&#039;ADD_ITEM&#039;, _(&quot;Add&quot;) , true, &#039;&#039;, &#039;default&#039;);
}
end_form();
// --------------------------------------------------------------------------------------------
end_page();</code></pre></div>]]></content>
			<author>
				<name><![CDATA[notrinos]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=36772</uri>
			</author>
			<updated>2017-12-24T07:55:56Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30265#p30265</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30262#p30262" />
			<content type="html"><![CDATA[<p><a href="https://github.com/FrontAccountingERP/FA/commit/2baa77a87a08a392928eb0ea49dbd9242d961514">Committed</a>.</p><p>/Joe - the committer <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-12-24T07:14:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30262#p30262</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30260#p30260" />
			<content type="html"><![CDATA[<p>@notrinos: great!<br />@boxygen: thanks for your perseverance and persistence</p><p>Lines 160 to 169 in <strong>includes/ui/ui_controls.inc</strong>:<br /></p><div class="codebox"><pre><code>function meta_forward($forward_to, $params=&quot;&quot;, $timeout=0)
{
    global $Ajax;
    echo &quot;&lt;meta http-equiv=&#039;Refresh&#039; content=&#039;&quot;.$timeout.&quot;; url=$forward_to?$params&#039;&gt;\n&quot;;
    echo &quot;&lt;center&gt;&lt;br&gt;&quot; . _(&quot;You should automatically be forwarded.&quot;);
    echo &quot; &quot; . _(&quot;If this does not happen&quot;) . &quot; &quot; . &quot;&lt;a href=&#039;$forward_to?$params&#039;&gt;&quot; . _(&quot;click here&quot;) . &quot;&lt;/a&gt; &quot; . _(&quot;to continue&quot;) . &quot;.&lt;br&gt;&lt;br&gt;&lt;/center&gt;\n&quot;;
    if ($params !=&#039;&#039;) $params = &#039;?&#039;.$params;
    $Ajax-&gt;redirect($forward_to.$params);
    exit;
}</code></pre></div><p>can now be modified to:<br /></p><div class="codebox"><pre><code>function meta_forward($forward_to, $params=&quot;&quot;, $timeout=0, $return=false) 
{
// $return argument is set to true if form submission has not yet been done and the form data is still needed
    global $Ajax;
    echo &quot;&lt;meta http-equiv=&#039;Refresh&#039; content=&#039;&quot;.$timeout.&quot;; url=$forward_to?$params&#039;&gt;\n&quot;;
    echo &quot;&lt;center&gt;&lt;br&gt;&quot; . _(&quot;You should automatically be forwarded.&quot;);
    echo &quot; &quot; . _(&quot;If this does not happen&quot;) . &quot; &quot; . &quot;&lt;a href=&#039;$forward_to?$params&#039;&gt;&quot; . _(&quot;click here&quot;) . &quot;&lt;/a&gt; &quot; . _(&quot;to continue&quot;) . &quot;.&lt;br&gt;&lt;br&gt;&lt;/center&gt;\n&quot;;
    if ($params !=&#039;&#039;) $params = &#039;?&#039;.$params;
    $Ajax-&gt;redirect($forward_to.$params);
    if (!$return) exit;
}</code></pre></div><p>@joe: can commit this.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-12-24T05:14:14Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30260#p30260</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30257#p30257" />
			<content type="html"><![CDATA[<p>@apmuthu<br />The other places are working because they are <strong>not</strong> calling <strong>meta_forward</strong> after form submit, I guess anywhere calling <strong>meta_forward</strong> after submit form will not store the values fed for next entry.</p><p>About the exit; in the ui_controls.inc line 168 we can understand its use through an example like following:</p><p>Let&#039;s comment out <strong>exit;</strong> in ui_controls.inc line 168<br />Now we make an sales entry, says Sales Quotation Entry<br />After process the order the <strong>$_SESSION[&#039;Items&#039;]</strong> will be cleared by the <strong>processing_end()</strong> at line 492 and function <strong>meta_forward</strong> will be called at line 501 of <strong>sales_order_entry.php</strong>, since the <strong>exit;</strong> is disabled so after redirect all statements in the <strong>sales_order_entry.php</strong> will not be stopped then we can see the errors:</p><p><span style="color: red"><br />Undefined index: Items in file: C:\xampp\htdocs\fa243\sales\sales_order_entry.php at line 700<br />Trying to get property of non-object in file: C:\xampp\htdocs\fa243\sales\sales_order_entry.php at line 700<br />Undefined index: Items in file: C:\xampp\htdocs\fa243\sales\sales_order_entry.php at line 707<br />Trying to get property of non-object in file: C:\xampp\htdocs\fa243\sales\sales_order_entry.php at line 707<br />Undefined index: Items in file: C:\xampp\htdocs\fa243\sales\sales_order_entry.php at line 713<br />Trying to get property of non-object in file: C:\xampp\htdocs\fa243\sales\sales_order_entry.php at line 713<br />Undefined index: Items in file: C:\xampp\htdocs\fa243\sales\sales_order_entry.php at line 719<br />Trying to get property of non-object in file: C:\xampp\htdocs\fa243\sales\sales_order_entry.php at line 719<br />Unhandled exception [0]: Call to a member function is_started() on null. in file: C:\xampp\htdocs\fa243\sales\sales_order_entry.php at line 737<br />exception_handler((Error Object))<br /></span></p><br /><p>In case of Dimension Entry the <strong>exit;</strong> can be disabled without any errors. So I think @apmuthu&#039;s suggestion for another argument for the function to conditionally execute an exit maybe good</p>]]></content>
			<author>
				<name><![CDATA[notrinos]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=36772</uri>
			</author>
			<updated>2017-12-24T03:46:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30257#p30257</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30249#p30249" />
			<content type="html"><![CDATA[<p>I don&#039;t know. We must address this to @itronics.</p><p>It might have something to do with ajax.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-12-23T14:54:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30249#p30249</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30244#p30244" />
			<content type="html"><![CDATA[<p>@notrinos: Why does it work everywhere else? What happens if the &quot;exit;&quot; is commented out in the main function itself?</p><p>@joe: was <a href="https://github.com/FrontAccountingERP/FA/blob/master/includes/ui/ui_controls.inc#L168">that</a> some debug code that got left behind or do we need another argument for the function to conditionally execute an exit?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-12-23T14:20:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30244#p30244</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30230#p30230" />
			<content type="html"><![CDATA[<p><strong>exit;</strong> statement in <strong>ui_controls.inc</strong> line 168 is the cause of @boxygen&#039;s trouble, I don&#039;t know why but you can temporarily&nbsp; create your own <strong>meta_forward</strong> function without the <strong>exit;</strong> statement so that your module can work as it is now.<br />Something like this<br /></p><div class="codebox"><pre><code>function clearing_meta_forward($forward_to, $params=&quot;&quot;, $timeout=0)
{
    global $Ajax;
    echo &quot;&lt;meta http-equiv=&#039;Refresh&#039; content=&#039;&quot;.$timeout.&quot;; url=$forward_to?$params&#039;&gt;\n&quot;;
    echo &quot;&lt;center&gt;&lt;br&gt;&quot; . _(&quot;You should automatically be forwarded.&quot;);
    echo &quot; &quot; . _(&quot;If this does not happen&quot;) . &quot; &quot; . &quot;&lt;a href=&#039;$forward_to?$params&#039;&gt;&quot; . _(&quot;click here&quot;) . &quot;&lt;/a&gt; &quot; . _(&quot;to continue&quot;) . &quot;.&lt;br&gt;&lt;br&gt;&lt;/center&gt;\n&quot;;
    if ($params !=&#039;&#039;) $params = &#039;?&#039;.$params;
    $Ajax-&gt;redirect($forward_to.$params);
    //exit;
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[notrinos]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=36772</uri>
			</author>
			<updated>2017-12-23T12:49:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30230#p30230</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30223#p30223" />
			<content type="html"><![CDATA[<p>Examples of <strong>meta_forward()</strong> usage are <a href="https://hotexamples.com/examples/-/-/meta_forward/php-meta_forward-function-examples.html">here</a> where the get variables are overwritten.</p><p>Which of the 5 lines calling the <strong>meta_forward()</strong> constructs did you comment out?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-12-23T12:01:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30223#p30223</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30218#p30218" />
			<content type="html"><![CDATA[<p>I have no words to thank you @notrinos and @apmuthu.</p><p>You are right. After commenting <strong>meta_forward()</strong> it is working.</p><p>Can you guide how to debug Ajax? I am very poor in that <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2017-12-23T10:30:43Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30218#p30218</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30208#p30208" />
			<content type="html"><![CDATA[<p>I was not right @Boxygen, I have just tested again on original dimension entry and the name field did not suggest the earlier values.<br />The problem is not browser, version or OS.</p><p>I guess the <strong>meta_forward()</strong> function somehow cleared all the earlier values, you may need to dig into Ajax system to find out where it is.</p><p>You can check by comment out the meta_forward() statement and see the values stored for the next entry (remember to keep $Ajax-&gt;activate(&#039;_page_body&#039;) ).</p>]]></content>
			<author>
				<name><![CDATA[notrinos]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=36772</uri>
			</author>
			<updated>2017-12-23T05:10:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30208#p30208</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30205#p30205" />
			<content type="html"><![CDATA[<p>Thanks a lot, you have take such a pain for my problem.</p><p>You may be right, but how does the browser and version issue / OS issue is only affecting dimension_entry.php page while other pages like I mentioned earlier company_preferences.php is working fine on the same browser, version and OS?</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2017-12-23T04:20:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30205#p30205</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto Fill List of Values in a Text Input Fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30203#p30203" />
			<content type="html"><![CDATA[<p>ah, the added line<br /></p><div class="codebox"><pre><code>include_once ($path_to_root . &quot;/includes/ui.inc&quot;);</code></pre></div><p>is not necessary, because I don&#039;t have other files in the <strong>clearing</strong> folder so the page needs include this to show its elements.</p><p>Your demo does not work as expected, Then it should be a browser and version issue / OS issue, as @apmuthu said</p>]]></content>
			<author>
				<name><![CDATA[notrinos]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=36772</uri>
			</author>
			<updated>2017-12-23T02:36:09Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30203#p30203</id>
		</entry>
</feed>
