admin管理员组文章数量:1332383
Since several hours ago I am trying to solve this issue but I don't know what I am doing wrong in the code.
I have a Custom Post Type with several records, then I wrote a php script to show the content as a table:
At the end of each row there is a button, the idea is to pass the row's POST_ID value to other form and php script. However, after you click this button, it opens a new tab with the URL including the name of the site and Post_ID value like https://telework/wp-admin/admin.php?Id=2749&submit_btn=Pagar
.
The button's code is:
<td> <form type="post"><input type="hidden" name="Id" value="<?php echo $post_id; ?>"><input type="submit" name="submit_btn" value="Pagar"></form></td>
I've tried to insert action="process.php"
inside <form>
, then change the type="post"
to method="post"
but gives me error 500.
How and where can I include the code to open the new form and php script? Thank you for your help and have a good day.
Marcelo
Since several hours ago I am trying to solve this issue but I don't know what I am doing wrong in the code.
I have a Custom Post Type with several records, then I wrote a php script to show the content as a table:
At the end of each row there is a button, the idea is to pass the row's POST_ID value to other form and php script. However, after you click this button, it opens a new tab with the URL including the name of the site and Post_ID value like https://telework/wp-admin/admin.php?Id=2749&submit_btn=Pagar
.
The button's code is:
<td> <form type="post"><input type="hidden" name="Id" value="<?php echo $post_id; ?>"><input type="submit" name="submit_btn" value="Pagar"></form></td>
I've tried to insert action="process.php"
inside <form>
, then change the type="post"
to method="post"
but gives me error 500.
How and where can I include the code to open the new form and php script? Thank you for your help and have a good day.
Marcelo
Share Improve this question edited Jun 30, 2020 at 12:34 nmr 4,5672 gold badges17 silver badges25 bronze badges asked Jun 29, 2020 at 14:08 MarceloVMarceloV 11 bronze badge1 Answer
Reset to default 0Anybody have this similar issue, please read this info at https://premium.wpmudev/blog/handling-form-submissions/, this helps me a lot.
本文标签: Button per line in Custom Post Types
版权声明:本文标题:Button per line in Custom Post Types 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742304454a2449633.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论