簡體   English   中英

Joomla 2.5表單重定向錯誤

[英]Joomla 2.5 form redirection error

這是我的表格

<form name="form1" action="<?php echo JRoute::_('index.php?option=com_mycomponent&task=search')?>" method="get">            
<input id="search_key" name="searchword" type="text" class="inputbox" placeholder="Enter Keyword/Part Number..." autocomplete="off">
<input type="submit" class="inputbutton" value="Search">
</form>  

輸入任何關鍵字說“測試”后,它將重定向到index.php?searchword = test

但是我需要將其重定向到index.php?option=com_mycomponent&task=search&searchword=test

在啟用/禁用sef中均不起作用

當我在url中鍵入index.php?option=com_mycomponent&task=search&searchword=test時,我轉到所需的頁面。

請告訴我我哪里錯了

您可以嘗試更改:

<form name="form1" action="<?php echo JRoute::_('index.php')?>" method="get">

<form name="form1" action="<?php echo JRoute::_('index.php')?>" method="get">
<input type="hidden" name="option" value="com_mycomponent">
<input type="hidden" name="task" value="search">

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM