2013-12-17 18 views
0

在WordPress的自定義模板頁面(工作空位)我試圖張貼表單到同一頁面。正如你在下面的代碼中看到的那樣。表單操作具有附加的查詢字符串。出於某種原因,當我附上查詢字符串時,表單似乎不起作用。它顯示我沒有模板的同一頁面。我曾嘗試在頁面上傾銷表單值,但其空白。與查詢字符串在同一頁上的WordPress的POST不起作用

請注意,PHP代碼將寫在同一頁上。

我也試圖改變行動

<?php echo site_url();?>/careers/job-vacancies/?application=122 

凡申請= 122是從哪裏來的?應用= 122從

另一頁

<form id="formVacancy" method="post" action="/careers/job-vacancies/?application=122"> 
     <input type="hidden" value="" name="wipit"/> 
     <input type="hidden" value="<?php echo $application_id; ?>" name="application"/> 
     <table width="100%" cellpadding="3" cellspacing="3"> 
      <tr> 
       <td colspan="2"><div id="msg">Please fill in all the fields.</div></td> 
      </tr> 
      <tr> 
       <td width="26%"><div align="right">Full Name : &nbsp; </div></td> 
       <td width="74%"><div align="left"><input name="name" type="text" id="name" size="30"></div></td> 
      </tr> 
      <tr> 
       <td><div align="right">Email Address : &nbsp;</div></td> 
       <td><div align="left"><input name="email" type="text" id="email" size="30"></div></td> 
      </tr> 
      <tr> 
       <td><div align="right">Phone Numher : &nbsp; </div></td> 
       <td><div align="left"><input name="phone" type="text" id="phone" size="30"></div></td> 
      </tr> 
      <tr> 
       <td><div align="right">Attach Cover Letter : &nbsp;</div></td> 
       <td><div align="left"><input name="cover" type="file" id="cover"></div></td> 
      </tr> 
      <tr> 
       <td><div align="right">Attach CV : &nbsp;</div></td> 
       <td><div align="left"><input name="resume" type="file" id="resume"></div></td> 
      </tr> 
      <tr> 
       <td><div align="right"></div></td> 
       <td><input type="submit" name="button" id="button" value="Submit"></td> 
      </tr> 
     </table> 
    </form> 
+0

爲什麼不通過隱藏輸入類型的應用程序= 122? –

+0

我編輯了這個問題,應用程序= 122來自網站的另一頁,另一個網址是 –

回答

0

變化:

<input name="name" type="text" id="name" size="30"> 

到:

<input name="fullname" type="text" id="fullname" size="30"> 

從以往的經驗WP具有張貼作爲一門學科的問題。

+0

而你是100萬正確的。正在尋找解決這個問題,但沒有運氣,我認爲你的經驗給我一個教訓。謝謝! –

0

Worpress即將在網站上的一個鏈接短premalinks上沒有通過GET變量的網址:因爲它是在WP抄本「只檢索公開。由WP_Query認可查詢變量這意味着,如果你用自己的查詢變量創建自己的自定義網址,get_query_var()將無法檢索這些」 不是註冊變量我使用的功能吧:

function get_url_var() { 
     $strURL = $_SERVER['REQUEST_URI']; 
     $inst = explode("/", $strURL); 
    $instno = (substr_count($strURL, '/')-1); 
     $arrVals = split("/",$strURL); 
     $found = $inst[$instno]; 
     return ($found == 0) ? 1 : $found; 
    } 

然後用get_url_var( '應用')

相關問題