我实际上有多种表格可以申请页面中的每项工作。
问题在于,只有我的第一个表格有效: -当我点击第一个表格时,我可以填写我的全名和电子邮件,也可以上传文件 -在其他表格上,除了文件上传,我可以填写所有内容:当我点击按钮时,什么也没发生
<?php
$args = array(
'post_type' => array( 'offre_demploi' ),
);
$query = new WP_Query( $args );
$i = 0;
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() )
{
$query->the_post();
echo '<div class="container">';
echo "\n";
echo '<div class="row">';
echo "\n";
echo '<div class="col-sm-4 col-12 "><h4 id="follow'.$i.'" class = "item item'. $i .'" >'.get_field("type_demploi") . '</h4></div>';
echo "\n";
echo '<div class="col-sm-8 col-12 nopadding descrip">';
echo "\n";
echo '<h5 >'.get_field("resume").'</h5> </div> </div>';
echo '<div class="row">';
echo "\n";
echo ' <div class="col-sm-4 col-12 agenceB"><br/><p>'.get_field("collaboration");
echo '</p><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalLong'.$i.'">
Postuler
</button>
<div class="modal fade item item'.$i.'" id="exampleModalLong'.$i.'" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle'.$i.'" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle'.$i.'">Postuler pour '. get_field("type_demploi") .'</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">';
gravity_form('Postuler', false, false, false, null, true );
echo ' </div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div> </div> ';
echo '
<div class="col-sm-4 col-12 agencenoB16 d-none d-lg-block offre nopadding3">
'.nl2br(get_field("description")).'
</div>
<div class="col-sm-4 col-12 agencenoB16 d-none d-lg-block offre nopadding3">
'.nl2br(get_field("description2")).'
</div>
</div>
<div class = "row d-block d-md-none">
<br/>
<div class="col">
<a href="#suite'.$i.'" class = "navigation"><p> Lire la suite </p></a>
</div>
<div class = "col no-gutters suite " id="suite'.$i.'">
<div class="col-sm-4 col-12 "></div>
<div class="col-sm-4 col-12 agencenoB16 offre nopadding3">
'.nl2br(get_field("description")).'
</div>
<div class="col-sm-4 col-12 agencenoB16 offre nopadding3">
'.nl2br(get_field("description2")).'
</div>
</div>
</div>
</div>
<br/><br/>';
$i++;
}
} else
{
// no posts found
}
// Restore original Post Data
wp_reset_postdata(); ?>
您知道为什么它不起作用吗?几天前它在工作,但是我不记得我是否可以编辑一些可以做到的事情... ps:$ i增量用于自动在我的表单中填写工作名称
谢谢