Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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. ?

share|improve this question

closed as off-topic by toscho Jul 28 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 Answer 1

up vote 1 down vote accepted

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/>';
share|improve this answer
    
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
    
You should accept this answer and open a new question. –  developdaly Dec 3 '12 at 15:03
    
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

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