0

I am using nice SMCF (Contact Form) want to add a wordpress post list Drop Down menu in "Simple Model Contact form"

here what i added on line '195' to try look.

$output .= "<div class='colmsg'><label for='smcf-message'>*" . __("Message", "smcf") . ": </label>
        <select name="">
  <option>Post1</option>
  <option>Post2</option>
  <option>Post1</option></select></div><br/>";

after saving / uploading file, it showing

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in plugins/simplemodal-contact-form-smcf/smcf.php on line 201

please help me how to get post list in form. ?

closed as off-topic by fuxia Jul 28 '14 at 7:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1

It just wasn't concatenated correctly (i.e. misuse of single/double quotes). This'll work:

$output .= '<div class="colmsg"><label for="smcf-message">*' . __("Message", "smcf") . ': </label>
        <select name="">
  <option>Post1</option>
  <option>Post2</option>
  <option>Post1</option></select></div><br/>';
  • thank you so much for this. can you help me ? i want all posts list in this drop down menu. – Nisha_at_Behance Dec 3 '12 at 15:02
  • thanks !! please have a look this screenshot what i want to do ... beurl.in/m – Nisha_at_Behance Dec 3 '12 at 15:19
  • i have added this code for post list <select class="post_list_smcf" name=""> <option>'.wp_get_archives('').'</option></select> but it display blank with no posts – Nisha_at_Behance Dec 3 '12 at 15:42
  • Open a new question and we can help you there. – developdaly Dec 3 '12 at 15:48
  • posted here is beurl.in/e – Nisha_at_Behance Dec 3 '12 at 16:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.