2017-07-18 31 views
0

我有多种形式为各种条件创建,但一次提交一个将带到另一个页面。如果我从所有带有条件值的表单回来,返回此页面时采用相同的值。这是我的代码单击浏览器返回按钮时无法获得正确的输入值?

<form action="<?php echo base_url($turl.'/fixture_result/3'); ?>" method="post"> 
<!-- CSRF NAME --> 
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>"> 
<!-- END OF CSRF --> 
<input type="hidden" name="grouptab" value="{{groupNameArry[index3]}}"> 
<input type="hidden" name="edit1" value="1"> 
<?php if($permission == 1 || $permission == 2) { ?> 
<input type="submit" value="Edit Tournament"class="btn-theme theme-btn-cancel"> 
<?php } ?> 
</form> 

其中{{groupNameArray}}是角度计算值。 groupNameArry包含A到G,而index3是一个额定值。同时提交这个表单到另一个页面,如果从那里如果我点击返回按钮它回到页面,但这次所有的grouptabl输入包含“A”;

请帮忙?只有在页面刷新时,我才得到了我的值。

+0

你能否提供更多信息?如何角度“计算”这个数组?当您返回路线时是否需要重新计算?如何为这些组件定义路线?这不是足够的代码或信息来帮助你解决这个问题。 – instantaphex

+0

一个plnkr会有帮助 – HebleV

+0

@instantaphex它的父节点上有一个循环,其中包含索引3 –

回答

0

通过在窗体上使用autocomplete="off"。我的问题得到解决。

这里是固定的代码

<form action="<?php echo base_url($turl.'/fixture_result/3'); ?>" method="post" autocomplete="off"> 
<!-- CSRF NAME --> 
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>"> 
<!-- END OF CSRF --> 
<input type="hidden" name="grouptab" value="{{groupNameArry[index3]}}"> 
<input type="hidden" name="edit1" value="1"> 
<?php if($permission == 1 || $permission == 2) { ?> 
<input type="submit" value="Edit Tournament"class="btn-theme theme-btn-cancel"> 
<?php } ?> 
</form> 
相关问题