shortcode function is supposed to return a string
-
currently says this:
————————-function simpleCC_display_form() {
// test to see if all the settings are correct
if ($this->ready()) {
?>
<div class=”simpleCC_plugin”>
<form class=”simpleCC_form” id=”simpleCC_form” method=”post”>
<label for=”simpleCC_fname”>First Name:<input type=”text” id=”simpleCC_fname” name=”simpleCC_fname” /></label>
<label for=”simpleCC_lname”>Last Name:<input type=”text” id=”simpleCC_lname” name=”simpleCC_lname” /></label>
<label for=”simpleCC_email”>Email:<input type=”email” id=”simpleCC_email” name=”simpleCC_email” /></label>
<button id=”simpleCC_submit” type=”submit” name=”simpleCC_submit” value=”simpleCC_submit_successful”>Submit</button>
</form>
</div>
<?php
}
}
——————————–
but should say this:
———————————–
function simpleCC_display_form() {
// test to see if all the settings are correct
if ($this->ready()) {return ‘<div class=”simpleCC_plugin”>
<form class=”simpleCC_form” id=”simpleCC_form” method=”post”>
<label for=”simpleCC_fname”>First Name:<input type=”text” id=”simpleCC_fname” name=”simpleCC_fname” /></label>
<label for=”simpleCC_lname”>Last Name:<input type=”text” id=”simpleCC_lname” name=”simpleCC_lname” /></label>
<label for=”simpleCC_email”>Email:<input type=”email” id=”simpleCC_email” name=”simpleCC_email” /></label>
<button id=”simpleCC_submit” type=”submit” name=”simpleCC_submit” value=”simpleCC_submit_successful”>Submit</button>
</form>
</div>’;
}
}
- The topic ‘shortcode function is supposed to return a string’ is closed to new replies.