代码在这里,但这是一个称为新闻通讯的插件。
我创建了自定义表单,提交后应将其重定向到我的thanks.php
页面。
<div class="tnp tnp-subscription">
<form method="post" action="https://mysite/thanks.php/" onsubmit="return newsletter_check(this)">
<div class="tnp-field tnp-field-profile"><label>Firma</label><input class="tnp-profile tnp-profile-1" type="text" required name="np1"></div>
<div class="tnp-field tnp-field-firstname"><label>Vorname</label><input class="tnp-firstname" type="text" name="nn" required></div>
<div class="tnp-field tnp-field-lastname"><label>Nachname</label><input class="tnp-lastname" type="text" name="ns" required></div>
<div class="tnp-field tnp-field-email"><label>E-Mail</label><input class="tnp-email" type="email" name="ne" required></div>
<p class="datenschutz">
<input type="checkbox" id="subscribeNews" name="subscribe" value="newsletter" required>Ich habe die <a href="https://dev.textilrammelkamp.de/datenschutzbelehrung/" target="_top">Datenschutzhinweise</a> gelesen und erkläre mich der Verwendung meiner Daten gemäß den Datenschutzhinweisen einverstanden.</p> </br>
<div class="tnp-field tnp-field-button"><input class="tnp-submit" type="submit" value="Jetzt Anmelden">
</div>
答案 0 :(得分:0)
只需在functions.php中为Java脚本重定向创建一个函数,并在需要时调用
/* Navigation Container */
.navbar {
overflow: hidden;
background-color: rgb(56,56,56) ;
font-family: Arial, Helvetica, sans-serif;
height : 70px ;
}
.container > a {
float: left;
font-size: 16px;
color: white;
text-align: center;
padding: 10px 16px;
text-decoration: none;
margin-left: 150px;
font-weight: bolder;
}
.navbar-nav a {
float: left;
font-size: 0.5rm;
color: rgb(198,206,212);
text-align: center;
padding: 10px 16px;
text-decoration: none;
}
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 14px;
border: none;
outline: none;
color: rgb(198,206,212);
padding: 10px 16px;
background-color: inherit;
font-family: inherit;
margin: 0;
}
.dropdown-content {
display: none;
position: absolute;
background-color: white;
min-width: 100px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
font-size : 0.80em ;
float: none;
color: black;
padding: 10px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: rgb(56,56,56);
}
.dropdown:hover .dropdown-content {
display: block;
}
.navbar a:hover, .dropdown:hover .dropbtn {
color : white ;
}
.ml-auto{
margin-left: 700px;
}