Home Forums General WordPress Discussions plugin bug need help

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17522
    Graham Kite
    Participant

    Trying to fox a bug in an autoresponder plugin

    This is my working autoresponder form code.

    			<!-- This for is actual autoresponder code and works It is not enetered in metabox fields. -->
    <form action="https://gopromail.co/login/index.php/lists/rp219bkkmj12f/subscribe" method="post">
    	   <label for="FNAME"></label> <input class="name" id="first_name" placeholder="First name" type="text" value="" name="FNAME" id="FNAME" />	
    	   <label for="LNAME"></label> <input class="name" id="first_name" placeholder="Last name" type="text" value="" name="LNAME" id="LNAME" />	 
    	   <label for="EMAIL" class="email"><span class="required"></span></label> <input class="email" placeholder="Email" type="text" value="" name=
    	   "EMAIL" id="EMAIL" />
    	 <div style="position: absolute; left: -5000px;" aria-hidden="true">
    	   <input type="text" name="5344d06d86c1c1100bb58b653477245b58ebe9c1" tabindex="-1" autocomplete="5344d06d86c1c1100bb58b653477245b58ebe9c1" value="" />
    	 </div>
    	 <div class="pull-right">
    	   <input type="submit" class="optinpagebutton" name="yt0" value="Join Now" />
    	 <div class="clearfix"></div>  
    
    </form>

    This is the plugin code

    <form> <!-- This tag added to fix css issue Form is not-->
    			       <!-- Name Fields changes to autoresponder fields // last nema added id left for css styling only-->
    			    <input type="text" class="name" name="FNAME" id="first_name" value="Enter Your First Name" onblur="copyName();clickrecall(this,'Enter Your First Name');" onFocus="javascript:if(this.value=='Enter Your First Name') this.value='';"/>
    				<input type="text" class="name" name="LNAME" id="first_name" value="Enter Your Last Name" onblur="copyName();clickrecall(this,'Enter Your Last Name');" onFocus="javascript:if(this.value=='Enter Your Last Name') this.value='';"/> 
    			    <input type="text" class="email" name="EMAIL" id="email" value="Type In Your Email Address" onblur="copyEmail();clickrecall(this,'Type In Your Email Address');" onFocus="javascript:if(this.value=='Type In Your Email Address') this.value='';"/>
    			    <input type="submit" name="go" id="go" class="optinpagebutton" value="<?php echo $buttontext; ?>"/>
    			</form>
    	
                    <!-- Form has correct information in the  url Query but does not send -->
    				<!-- data is being pulled from metabox fields   wp-optin.php between 635 -> 675  -->
    
    				<form id="form2" name="form2" method="post" action="<?php echo esc_url($formURL); ?>">			              	
    				<input type="hidden" class="name" id="autoname" name="<?php echo $nameField; ?>" value='First Name'/>
    				<input type="hidden" class="name" id="autoname" name="<?php echo $lastnameField; ?>" value='Last Name'/>
    				<input type="hidden" class="email" id="autoemail" name="<?php echo $emailField; ?>" value='Email'/>
    				<?php echo $hiddenFields; ?>
    			</form>

    I see the fields for FNAME, LNAME, EMAIL

    But I can not see the field name for the $formurl field which populated the action to send the form.

    I'm sure it's just me looking this for way to long, so if anyone can see what I am missing I would greatly appreciate it.
    The way the metabox works is all I need to do is paste the autoresponder code into a text area and it automatically
    finds these variables

    $post_id          = $post->ID;
    	$formURL          = get_post_meta( $post_id, 'wpoptin_optin_form_url', true );
    	$emailField       = get_post_meta( $post_id, 'wpoptin_optin_email_field', true );
    	$nameField        = get_post_meta( $post_id, 'wpoptin_optin_name_field', true );
    	$lastnameField    = get_post_meta( $post_id, 'wpoptin_optin_name_field', true );
    	$hiddenFields     = get_post_meta( $post_id, 'wpoptin_optin_hidden_field', true );
    	$buttontext       = get_post_meta( $post_id, 'wpoptin_button_text', true );

    and sends the data to the correct field but the form action is not correct so it does not send.

    #17587
    Benjamin
    Keymaster

    I've got a solution and will post it later today.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.