• Resolved KaelinDesign

    (@kaelindesign)


    I’m trying to add a contact form to the admin side of my WordPress install. Basically, if one of my users wants to ask me a question, I want it to be as easy as possible.

    I hard coded the form onto a page that I built, but I can’t seem to connect to the process script. I’ve tried various actions on the form, but either it doesn’t work, or I receive a forbidden screen.

    <form method="post" id="si_contact_form2" action="http://myserveraddress/~mywordpress/wp-content/plugins/si-contact-form/si-contact-form-process.php">
    <div style="text-align:left;">
    
       </div>
    
             <div>
                   <input type="hidden" value="1" name="si_contact_CID">
            </div>
    
            <div style="text-align:left; padding-top:5px;">
                    <label for="si_contact_subject2">Subject:</label>
            </div>
            <div style="text-align:left;">
                    <input type="text" size="50" value="" name="si_contact_subject" id="si_contact_subject2" style="text-align:left; margin:0; -webkit-border-radius: 10px; border-radius: 10px;">
            </div>
    
            <div style="text-align:left; padding-top:5px;">
                    <label for="si_contact_message2">Message:<span style="text-align:left;">*</span></label>
            </div>
            <div style="text-align:left;">
                    <textarea rows="10" cols="50" name="si_contact_message" id="si_contact_message2" style="text-align:left; margin:0; -webkit-border-radius: 10px; border-radius: 10px;"></textarea>
            </div>
    
    <div style="text-align:left; padding-top:2px;">
      <input type="hidden" value="send" name="si_contact_action">
      <input type="hidden" value="2" name="si_contact_form_id">
      <input type="submit" value="Submit" style="cursor:pointer; margin:0;-webkit-border-radius: 30px; border-radius: 30px;background: #6f9357; /* Old browsers */ background: -moz-linear-gradient(top,  #6f9357 0%, #7aa15e 31%, #5a7c47 93%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6f9357), color-stop(31%,#7aa15e), color-stop(93%,#5a7c47)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top,  #6f9357 0%,#7aa15e 31%,#5a7c47 93%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top,  #6f9357 0%,#7aa15e 31%,#5a7c47 93%); /* Opera 11.10+ */ background: -ms-linear-gradient(top,  #6f9357 0%,#7aa15e 31%,#5a7c47 93%); /* IE10+ */ background: linear-gradient(to bottom,  #6f9357 0%,#7aa15e 31%,#5a7c47 93%); /* W3C */ height: 38px;  width:87px; text-transform:uppercase;color:#ffffff; text-shadow: 1px 1px 1px rgba(0,0,0,0.4); border: 1px solid #375323; float: right;  margin: 0px 20px 0 0; font-size:13px; -webkit-box-shadow: 1px 1px 3px -1px rgba(0, 0, 0, 0.8); box-shadow:1px 1px 3px -1px rgba(0, 0, 0, 0.8)" id="fsc-submit-2">
    </div>
    
    </form>

    Is there a specific script I can reference to, or is this beyond the scope of the plugin?

    http://wordpress.org/extend/plugins/si-contact-form/

Viewing 4 replies - 1 through 4 (of 4 total)
  • This is beyond the scope of the plugin. The plugin security does not allow you to make a form to post into it like that. The next release will even include a salted hashed token that is checked server side when you click submit. The processing logic will detect that the form was forged and redirect you to the blank form again.

    Thread Starter KaelinDesign

    (@kaelindesign)

    Hmm. What about calling the array directly? Something like this:

    http://wordpress.stackexchange.com/questions/61567/do-shortcode-within-admin-page

    These methods should work to make the form show.
    How can I add the contact form to a template manually rather than use shortcode in a page?

    Use this code:

    <?php
    if ( isset($si_contact_form) )  {
     echo $si_contact_form->si_contact_form_short_code( array( 'form' => '1' ) );
    }
    ?>

    Be sure to set the correct form number for example, for form 2 you have to set: ‘form’ =>’2′

    This may work also:
    <php? echo do_shortcode('[si-contact-form form="1"]'); ?>

    Thread Starter KaelinDesign

    (@kaelindesign)

    I did work with those for a while, but found that shortcodes are set after plugins are enabled- which doesn’t actually happen on the admin side. They only get enabled for the front end, even though the menus and things are on the backend. I ended up writing a little php email form instead.

    I really appreciate your suggestions, Mike, and your coding!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Contact form in Admin area’ is closed to new replies.