Nieuwsbrief koppelen aan eigen gemaakt inschrijfformulier
http://support.wysija.com/knowledgebase/plugin-form-integrate/
Graag zou ik willen om bovenstaande link te combineren met mijn eigen inschrijfformulier:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
<div class="blok4">
<h3>Nieuwsbrief</h3>
<form action="formulier.php" id="nieuwsbrief">
<input name="white_box" type="text" class="vak" size="20" onclick="this.value='';" onblur="this.value=!this.value?'Naam..':this.value;" value="Naam.." />
<input name="white_box" type="text" class="vak" size="20" onclick="this.value='';" onblur="this.value=!this.value?'E-mailadres..':this.value;" value="E-mailadres.." />
<input name="submit" type="button" class="inschrijven" value="Inschrijven" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="cx" value="partner-pub-5563407691970865:t3e0y89u7in" />
</form>
</div>
<h3>Nieuwsbrief</h3>
<form action="formulier.php" id="nieuwsbrief">
<input name="white_box" type="text" class="vak" size="20" onclick="this.value='';" onblur="this.value=!this.value?'Naam..':this.value;" value="Naam.." />
<input name="white_box" type="text" class="vak" size="20" onclick="this.value='';" onblur="this.value=!this.value?'E-mailadres..':this.value;" value="E-mailadres.." />
<input name="submit" type="button" class="inschrijven" value="Inschrijven" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="cx" value="partner-pub-5563407691970865:t3e0y89u7in" />
</form>
</div>
Gewijzigd op 21/12/2012 12:42:46 door -- R --
En wat is dus precies je probleem?
Max - op 21/12/2012 12:47:47:
En wat is dus precies je probleem?
Om onderstaande code te koppelen, maar zou niet weten hoe..
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function processMyForm(){
//you could make some validation even though validation
//is also processed in our function
$myEmailVariable=$_POST['myEmailVariable'] ;
$myListId1=$_POST['myListId1'] ;
$myListId2=$_POST['myListId2'] ;
//in this array firstname and lastname are optional
$userData=array(
'email'=>$myEmailVariable,
'firstname'=>$firstname,
'lastname'=>$lastname);
$data=array(
'user'=>$userData,
'user_list'=>array('list_ids'=>array($myListId1,$myListId2))
);
$userHelper=&WYSIJA::get('user','helper');
$userHelper->addSubscriber($data);
//this function will add the subscriber to wysija
//if double optin is on it will send a confirmation email
//to the subscriber
//if double optin is off and you have an active automatic
//newsletter then it will send the automatic newsletter to the subscriber
}
add_action('init','processMyForm') ;
//you could make some validation even though validation
//is also processed in our function
$myEmailVariable=$_POST['myEmailVariable'] ;
$myListId1=$_POST['myListId1'] ;
$myListId2=$_POST['myListId2'] ;
//in this array firstname and lastname are optional
$userData=array(
'email'=>$myEmailVariable,
'firstname'=>$firstname,
'lastname'=>$lastname);
$data=array(
'user'=>$userData,
'user_list'=>array('list_ids'=>array($myListId1,$myListId2))
);
$userHelper=&WYSIJA::get('user','helper');
$userHelper->addSubscriber($data);
//this function will add the subscriber to wysija
//if double optin is on it will send a confirmation email
//to the subscriber
//if double optin is off and you have an active automatic
//newsletter then it will send the automatic newsletter to the subscriber
}
add_action('init','processMyForm') ;
<input name="white_box" type="text"
Twee keer dezelfde name?
Gaat vast niet werken.
- SanThe - op 21/12/2012 17:23:08:
<input name="white_box" type="text"
<input name="white_box" type="text"
Twee keer dezelfde name?
Gaat vast niet werken.
<input name="white_box" type="text"
Twee keer dezelfde name?
Gaat vast niet werken.
Los daar van, had ik inderdaad over het hoofd gezien, moet ik hem toch zien te koppelen