我在一个 php 变量中有我的表单,该变量稍后在代码中返回:
$email_form = '<form class="cpd-form store-form" method="post" action="'.get_permalink().'">
<input type="hidden" id="contact-action" name="contact-action" value="" />
<div class="your-details group">
<div class="your-detail">
<label for="cpdstore_name">Name:</label>
<input type="text" name="cpdstore_name" id="cpdstore-name" value="" />
</div>
<div class="your-detail end-detail">
<label for="cpdstore_school">School/Department:</label>
<input type="text" name="cpdstore_school" id="cpdstore-school" value="" />
</div>
<div class="your-detail">
<label for="cpdstore_email">Email:</label>
<input type="text" name="cpdstore_email" id="cpdstore-email" value="" />
</div>
<div class="your-detail end-detail">
<label for="cpdstore_phone">Phone:</label>
<input type="text" name="cpdstore_phone" id="cpdstore-phone" value="" />
</div> ...
我需要使表单具有粘性,我如何以及如何将 php 条件插入到输入值中?