How to get Values from FrontEnd User Form and display in WP Admin Panel?
-
Hello guys,
Iam tryring to get Values from a Form which i have included in the FronEnd (RadioButton Value and Text Input Value) to display in the WordPress
BackEnd or AdminPanel, so I need to have a Admin Menu to get the Values, a specific user (E-Mail Adress) entered in the Form and display this Values in the Backend.I am using a Newsletter Plugin its called MyMail for WordPress. I want to know why Users unsubscribe to my Newsletter by letting them check Radio Buttons with Reasons or write a Text in a Textarea input.
I modified the unsubscribe form and added some radio buttons and a textarea heres the code:………..
$html = ”;
$html .= $this->get_styles();
$action = ‘mymail_form_unsubscribe’;
$html .= ‘<form action=”‘.$this->get_form_action($action).'” method=”post” class=”mymail-form mymail-form-submit mymail-ajax-form” id=”mymail-form-unsubscribe”>’.”\n”;
$html .= ‘<div class=”mymail-form-info ‘.$infoclass.'”>’;$html .= $this->get_message();
$html .= $this->message;
$html .= ‘</div>’;
$html .= ‘<input name=”hash” type=”hidden” value=”‘.$this->hash.'”>’;
$html .= ‘<input name=”campaign” type=”hidden” value=”‘.$this->campaignID.'”>’;if(!$this->hash){
$html .= ‘<div class=”mymail-wrapper mymail-email-wrapper”><div class=”mymail-form-fields”>
<div class=”mymail-form-info-checkbox”>
<fieldset id=”gruende”>- <label> <input id=”one” class=”.myCheckbox” type=”radio” name=”reason” value=”notwanted”> Ich habe mich nie für diesen Newsletter angemeldet </label>
- <label> <input id=”two” class=”.myCheckbox” type=”radio” name=”reason” value=”notrelevant”> Die im Newsletter genannten Themen sind für mich nicht relevant </label>
- <label> <input id=”three” class=”.myCheckbox” type=”radio” name=”reason” value=”notinterested”> Ich erhalte zu viele Newsletter </label>
- <label> <input id=”four” class=”.myCheckbox” type=”radio” name=”reason” value=”often”> Ich bin an der Zeitarbeitsbranche nicht mehr interessiert </label>
- <label> <input id=”otherreasons” type=”radio” name=”reason” value=”otherreason”> Sonstiges: </label>
- <label> <input style=”height: 125px; width: 80%;” id=”otherreasontextfield” type=”text” name=”ownreason” value=”” placeholder=”Bitte geben Sie einen Grund an”></label>
</fieldset>
</div><div id=”emailproof”><label for=”mymail-email”>’.mymail_text(’email’, __(‘Email’, ‘mymail’)).’ <span class=”mymail-required”>*</span></label>’;
$html .= ‘<input id=”mymail-email” class=”input mymail-email mymail-required” name=”email” type=”email” value=””>’;}
if($subscriber && $single_opt_out){
}else{
$buttontext = mymail_text(‘unsubscribebutton’, __(‘Unsubscribe’, ‘mymail’));
$html .= ‘<div class=”mymail-wrapper mymail-submit-wrapper form-submit”><input name=”submit” type=”submit” value=”‘.$buttontext.'” class=”submit-button button”></div>’;
$html .= ‘</div></div>’;
}
$html .= ‘</form>’;return apply_filters(‘mymail_unsubscribe_form’, $html, $this->campaignID);
}…………..
Hope somebody can help me with this.
Best Regards.AleyKey
- The topic ‘How to get Values from FrontEnd User Form and display in WP Admin Panel?’ is closed to new replies.