Javascript 引导提交按钮未提交-PHP

Javascript 引导提交按钮未提交-PHP,javascript,php,html,css,Javascript,Php,Html,Css,首先,如果这个问题已经被问到,我想道歉。但是,我无法解决这个问题。我不知道在哪里可以找到问题,也不知道填表时为什么不打印出来。我有一个简单的PHP文件,它从表单中获取数据,并应在屏幕上打印出来: if (isset($_POST['submit'])) { //get data from form $Title = $_POST['Title']; // title of case study $Summary = $_POST['Summary']; // summary of c

首先,如果这个问题已经被问到,我想道歉。但是,我无法解决这个问题。我不知道在哪里可以找到问题,也不知道填表时为什么不打印出来。我有一个简单的PHP文件,它从表单中获取数据,并应在屏幕上打印出来:
if (isset($_POST['submit']))
    {
//get data from form


$Title = $_POST['Title']; // title of case study
$Summary = $_POST['Summary']; // summary of case study
$WhatDid = $_POST['WhatDid']; // what did you do question
$Volunteering = $_POST['Volunteering'];
$Credit = $_POST['Credit-bearing'];
$Local = $_POST['Local-schools'];            // themes checkboxes
$Elderly = $_POST['Elderly'];
$Environmental = $_POST['Environmental'];
$Edinburgh = $_POST['Edinburgh'];
$Scotland = $_POST['Scotland'];
$UK = $_POST['UK'];                          // themes checboxes
$International = $_POST['International'];
$Online = $_POST['Online'];
$Other = $_POST['Other_theme'];              // themes checboxes
$Undergraduate = $_POST['Undergraduate'];    // cohort checboxes
$Masters = $_POST['Masters'];
$PhD = $_POST['PhD'];                        // cohort checboxes
$WhyDid = $_POST['WhyDid'];
$WhatWell = $_POST['WhatWell'];
$WhatDifferently = $_POST['WhatDifferently'];
$Scalability = $_POST['Scalability'];
$FurtherInfo = $_POST['FurtherInfo'];
$Location = $_POST['Location'];
$AuthorTitle = $_POST['title'];// authors title
$F_Name = $_POST['first_name'];
$L_Name = $_POST['last_name'];
$Email = $_POST['email'];
$Contactauthor = $_POST['contact'];
$Note1 = $_POST['note1'];
$Note2 = $_POST['note2'];
$Engagement = $_POST['engagement']; // date of engagement

echo nl2br(
    "This is a $Title, 
    \n this is a $Summary, 
    this is a  $WhatDid, 
    \n this is checkbox $Volunteering, 
    this is checkbox $Credit, 
    \n this is checkbox $Local, 
    this is checkbox $Elderly, 
    \n this is checkbox $Environmental, 
    this is checkbox $Edinburgh, 
    \n this is checkbox $Scotland, 
    this is checkbox $UK, 
    \n this is checkbox $International, 
    this is checkbox $Online, 
    \n this is other themes $Other, 
    this is an $Undergraduate, 
    \n this is a $Masters, 
    this is a $PhD,  
    \n this is why it was done: $WhyDid, 
    this is what went well: $WhatWell, 
    \n this is what could be done differently: $WhatDifferently, 
    Could it be scalable & transerable?: $Scalability,
    \n Additional information?: $FurtherInfo,
    Location of practice: $Location,
    \n this is an Author $AuthorTitle $F_Name $L_Name, email address: $Email  
    and he is contact: $Contactauthor, 
    \n this is a date of engagement $Engagement, 
    Author agrees with possible ammendments: $Note1, $Note2."
);
下面是一个html本身:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title> Submit Case Study</title>

<script   src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js">
    </script>

<script type="text/javascript">
    // if Google is down, it looks to local file...
    if (typeof jQuery == 'undefined') {
        document.write(unescape("script src='js/jquery-1.11.2.min.js'      type='text/javascript'/script"));
}
</script>

    <!-- jQuery library -->
    <!--<script src="http://code.jquery.com/jquery-2.1.4.js"></script>-->

    <!-- script to clone author -->
    <script type="text/javascript" src="JS/clone-form-td.js"></script>

    <!-- Own stylesheet -->
    <link rel="stylesheet" href="CSS/style.css" type="text/css"/>

    <!-- jQuery customized theme-->
    <link rel="stylesheet" href="CSS/jquery-ui.css">
    <script src="JS/jquery-ui.js"></script>
    <script src="JS/jquery-ui.min.js"></script>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

<script>
        function toggle(id) {
        if (document.getElementById(id).style.display == 'none') {
            document.getElementById(id).style.display = 'block';    
        } else {                                                    
            document.getElementById(id).style.display = 'none';
        }
    } //script to expand text field when
</script> 

<script>
$(function(){    
$("#date").datepicker({dateFormat: "dd-mm-yy"}); // datepicker
});
</script>

<style>
  .ui-datepicker {font-size:85%; } /* custom size of datepicker */
</style>
</head>
<body>

<form name="submit" action="PHP/submit-test.php" method="POST">

    <div class="main container">

        <p class="label1">Title *</p>
        <input class="textboxstyle" type="text" name="Title">
        <p class="help-block">Meaningful, short descriptive title</p>
        <br>

        <p class="label1">Summary *</p>
        <textarea name="Summary"></textarea>
        <p class="help-block">Brief summary of what the engagement involved.</p>
        <br>

        <p class="label1">What did you do? *</p>
        <textarea name="WhatDid"></textarea>
        <p class="help-block">Please give a description of the case study including the theme(s)/topics(s) it relates to (please see list overleaf). It would be helpful if this could include the stage of development (e.g. whether the practice is new or established). Please include links to key themes/topics .</p>
        <br>

        <div>
            <p class="label1">Links to key themes/topics *</p>
            <div class="checkbox">
                <input type="checkbox" id="Volunteering" name="Volunteering" value="YES"/> Volunteering<br/>
                <input type="checkbox" id ="Credit-bearing" name="Credit-bearing" value="YES"/> Credit-bearing course<br/>
                <input type="checkbox" id="Local-schools" name="Local-schools" value="YES"/> Working with local schools and / or young people<br/>
                <input type="checkbox" name="Elderly" value="YES"/> Working with elderly people<br/>
                <input type="checkbox" name="Environmental" value="YES"/> Environmental or sustainability<br/>
                <input type="checkbox" name="Edinburgh" value="YES"/> Based in Edinburgh or the Lothians<br/>
                <input type="checkbox" name="Scotland" value="YES"/> Based in Scotland (excluding Edinburgh or the Lothians)<br/>
                <input type="checkbox" name="UK" value="YES"/> Based in the UK<br/>
                <input type="checkbox" name="International" value="YES"/> Based internationally<br/>
                <input type="checkbox" name="Online" value="YES"/> Online component<br/>
                <input type="checkbox" onclick="toggle('Other_theme')" name="Other"> Other<br/>
                <div id="other_theme" style="display:none;">
                <input type="text" class="singleline1" id="Other_theme" name="Other_theme" required="">
                </div>
            </div>  
        </div>
        <div>
        <p class="label1">Student cohort*</p>
            <div class="checkbox">
                <input type="checkbox" name="Undergraduate" value="YES"> Undergraduate<br>
                <input type="checkbox" name="Masters" value="YES"> Postgraduate (Masters)<br>
                <input type="checkbox" name="PhD" value="YES"> Postgraduate (Research)<br>
            </div>
        </div>

        <p class="label1">Why did you do it? *</p>
        <textarea name="WhyDid"></textarea>
        <p class="help-block">A brief outline of the reasons behind the practice described - its purpose and benefits. What change was it intended to make or problem was it designed to solve?</p>
        <br>

        <p class="label1">What went well? *</p>
        <textarea name="WhatWell"></textarea>
        <p class="help-block">A brief outline of what worked well for you/ your organisation. What were the highlights? Did you receive any positive feedback?</p>
        <br>

        <p class="label1">What might you have done differently? *</p>
        <textarea name="WhatDifferently"></textarea>
        <p class="help-block">A brief outline of any particular challenges faced and how these were addressed. Please also say if you are planning any changes or further developments.</p>
        <br>

        <p class="label1">Scalability and transferability *</p>
        <textarea name="Scalability"></textarea>
        <p class="help-block">Is this practice scalable and transferable? What is the potential for it being expanded and/or run elsewhere in the University? A brief outline of workload commitments in setting up and maintaining the practice would also be useful.</p>
        <br>   

        <p class="label1">Further information *</p>
        <textarea name="FurtherInfo"></textarea>
        <p class="help-block">e.g. website or publications, materials used, presentation slides, screen shots, testimonials. A couple of quotes from community members, students or staff illustrating the case study would be particularly useful.</p>
        <br>  

        <p class="label1">Location of practice *</p>
        <textarea name="Location"></textarea>
        <p class="help-block">Name of community partner, academic School/ support service involved (if applicable).</p>
        <br> 
<div id="author1" class="clonedInput">
<p id="author" class="label1">Author </p>
<div class="row">
    <div class="col-md-1 col-sm-6 col-xs-4">
        <input id="title" name="title" type="text" placeholder="" class="input_title textboxstyle">
        <p id="help-block-title" class="help-block-title">Title</p>
    </div>
    <div class="col-md-2">
        <input id="first_name" name="first_name" type="text" placeholder="" class="input_fn textboxstyle">
        <p id="help-block-fn" class="help-block-fn">First Name</p>
    </div>
    <div class="col-md-2">
        <input id="last_name" name="last_name" type="text" placeholder="" class="input_ln textboxstyle">
        <p id="help-block-ln" class="help-block-ln">Last Name</p>
    </div>
    <div class="col-md-2">
        <input id="email" name="email" type="email" placeholder="abc@example.com" class="input_email textboxstyle">
        <p id="help-block-email" class="help-block-email">Email</p>
    </div>
    <div class="col-md-1 col-sm-1 col-xs-2">
        <input id="contact" name="contact" type="checkbox" value="YES" class="contact">
        <p id="help-block-checkbox" class="help-block-checkbox">Contact</p>
    </div>

   <div class="col-md-2 col-sm-2 col-xs-4">
        <input id="btnAdd" name="btnAdd" type="button" class="btn btn-info" value="Add author">
    </div>
    <div class="col-md-2 col-sm-2 col-xs-3">
        <input id="btnDel" name="btnDel" type="button" class="btn btn-danger" value="Remove author">
    </div>
   </div>
</div>

        <p class="label1">Date*</p>
        <div>
        <div class="datebox">
            <input id="date" class="date" name="engagement">
            <p class="help-block">When the engagement activity took place</p>
        </div>    
        </div>
        <div>
        <p class="label1">Note for authors</p>
            <div>
            <input name="note1" type="checkbox" value="YES"><p class="prg-text"> 1) The full case study (in this template format) will be included on a public wiki database.</p>
            </div>
            <div>
            <input name="note2" type="checkbox" value="YES"><p class="prg-text"> 2) The Student Community Engagement team will produce a summary version of each case study suitable for an external and internal audience. Authors will be asked to approve these public versions of their case studies before they are made available on open websites. These case studies will be available as .pdf downloads and other formats suitable for printing and inclusion in publications, as web pages and for presentations. These will be available on the public section of the Student Community Engagement website and linked to other key sites.</p> 
            </div>

        <p class="help-block">The case study will be used in two ways and consent of author is required for both.</p>    
        </div>  

        <br><br>

<input class="submit btn btn-primary" type="submit" name="submit" value="submit">

</div>  

</form>
</body>

提交案例研究
//如果谷歌关闭了,它会查找本地文件。。。
if(typeof jQuery==“未定义”){
编写(unescape(“scriptsrc='js/jquery-1.11.2.min.js'type='text/javascript'/script”);
}
功能切换(id){
if(document.getElementById(id).style.display=='none'){
document.getElementById(id).style.display='block';
}否则{
document.getElementById(id).style.display='none';
}
}//用于在以下情况下展开文本字段的脚本
$(函数(){
$(“#date”).datepicker({dateFormat:“dd-mm-yy”});//datepicker
});
.ui日期选择器{字体大小:85%;}/*日期选择器的自定义大小*/
标题*

有意义的简短描述性标题


总结*

业务涉及内容的简要总结


您做了什么*

请描述案例研究,包括与之相关的主题(请参见背面的列表)。如果这可以包括发展阶段(例如,实践是新的还是已确立的),这将是有帮助的。请包括关键主题/主题的链接


关键主题/主题的链接*

志愿服务
学分制课程
与当地学校和/或年轻人合作
与老年人一起工作
环境或可持续性
位于爱丁堡或洛锡安
总部位于苏格兰(不包括爱丁堡或洛锡安)
总部位于英国
国际总部
在线组件
其他
学生群体*

本科生
研究生(硕士)
研究生(研究)
你为什么这么做*

简要概述所述实践背后的原因——目的和好处。它打算做出什么样的改变,或者设计用来解决什么样的问题


什么进展顺利*

简要概述什么对您/您的组织有效。亮点是什么?你有没有收到任何积极的反馈


您可能会采取哪些不同的做法*

简要概述所面临的任何特定挑战以及如何应对这些挑战。还请说明您是否计划进行任何更改或进一步开发


可扩展性和可转移性*

这种做法是否可扩展和转移?在大学其他地方扩展和/或运行it的潜力是什么?简要概述建立和维持这一做法的工作量承诺也很有用


进一步信息*

例如网站或出版物、使用的材料、演示幻灯片、屏幕截图、推荐信。社区成员、学生或工作人员对案例研究的几句话将特别有用


执业地点*

社区合作伙伴、所涉及的学术学校/支持服务的名称(如适用)


作者

标题

名字

姓氏

电子邮件

联系

日期*

当参与活动发生时

作者须知

1)完整的案例研究(采用此模板格式)将包含在公共wiki数据库中

2)学生社区参与团队将为每个案例研究编制一份适合外部和内部受众的摘要版本。作者将被要求批准这些案例研究的公开版本,然后才能在公开网站上发布。这些案例研究将以.pdf下载和其他适合打印和包含在出版物中的格式、网页和演示文稿的形式提供。这些将在学生社区参与网站的公共部分提供,并链接到其他关键网站。

案例研究将以两种方式使用:

<form name="submit" action="PHP/submit-test.php" method="POST">
<input class="submit btn btn-primary" type="submit" name="submit" value="submit">
<form name="form1" action="PHP/submit-test.php" method="POST">
  <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title> Submit Case Study</title>

<script   src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js">
    </script>

<script type="text/javascript">
    // if Google is down, it looks to local file...
    if (typeof jQuery == 'undefined') {
        document.write(unescape("script src='js/jquery-1.11.2.min.js'      type='text/javascript'/script"));
}
</script>

    <!-- jQuery library -->
    <!--<script src="http://code.jquery.com/jquery-2.1.4.js"></script>-->

    <!-- script to clone author -->
    <script type="text/javascript" src="JS/clone-form-td.js"></script>

    <!-- Own stylesheet -->
    <link rel="stylesheet" href="CSS/style.css" type="text/css"/>

    <!-- jQuery customized theme-->
    <link rel="stylesheet" href="CSS/jquery-ui.css">
    <script src="JS/jquery-ui.js"></script>
    <script src="JS/jquery-ui.min.js"></script>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

<script>
        function toggle(id) {
        if (document.getElementById(id).style.display == 'none') {
            document.getElementById(id).style.display = 'block';    
        } else {                                                    
            document.getElementById(id).style.display = 'none';
        }
    } //script to expand text field when
</script> 

<script>
$(function(){    
$("#date").datepicker({dateFormat: "dd-mm-yy"}); // datepicker
});
</script>

<style>
  .ui-datepicker {font-size:85%; } /* custom size of datepicker */
</style>
</head>
<body>

<form action="PHP/submit-test.php" method="POST">

    <div class="main container">

        <p class="label1">Title *</p>
        <input class="textboxstyle" type="text" name="Title">
        <p class="help-block">Meaningful, short descriptive title</p>
        <br>

        <p class="label1">Summary *</p>
        <textarea name="Summary"></textarea>
        <p class="help-block">Brief summary of what the engagement involved.</p>
        <br>

        <p class="label1">What did you do? *</p>
        <textarea name="WhatDid"></textarea>
        <p class="help-block">Please give a description of the case study including the theme(s)/topics(s) it relates to (please see list overleaf). It would be helpful if this could include the stage of development (e.g. whether the practice is new or established). Please include links to key themes/topics .</p>
        <br>

        <div>
            <p class="label1">Links to key themes/topics *</p>
            <div class="checkbox">
                <input type="checkbox" id="Volunteering" name="Volunteering" value="YES"/> Volunteering<br/>
                <input type="checkbox" id ="Credit-bearing" name="Credit-bearing" value="YES"/> Credit-bearing course<br/>
                <input type="checkbox" id="Local-schools" name="Local-schools" value="YES"/> Working with local schools and / or young people<br/>
                <input type="checkbox" name="Elderly" value="YES"/> Working with elderly people<br/>
                <input type="checkbox" name="Environmental" value="YES"/> Environmental or sustainability<br/>
                <input type="checkbox" name="Edinburgh" value="YES"/> Based in Edinburgh or the Lothians<br/>
                <input type="checkbox" name="Scotland" value="YES"/> Based in Scotland (excluding Edinburgh or the Lothians)<br/>
                <input type="checkbox" name="UK" value="YES"/> Based in the UK<br/>
                <input type="checkbox" name="International" value="YES"/> Based internationally<br/>
                <input type="checkbox" name="Online" value="YES"/> Online component<br/>
                <input type="checkbox" onclick="toggle('Other_theme')" name="Other"> Other<br/>
                <div id="other_theme" style="display:none;">
                <input type="text" class="singleline1" id="Other_theme" name="Other_theme" required="">
                </div>
            </div>  
        </div>
        <div>
        <p class="label1">Student cohort*</p>
            <div class="checkbox">
                <input type="checkbox" name="Undergraduate" value="YES"> Undergraduate<br>
                <input type="checkbox" name="Masters" value="YES"> Postgraduate (Masters)<br>
                <input type="checkbox" name="PhD" value="YES"> Postgraduate (Research)<br>
            </div>
        </div>

        <p class="label1">Why did you do it? *</p>
        <textarea name="WhyDid"></textarea>
        <p class="help-block">A brief outline of the reasons behind the practice described - its purpose and benefits. What change was it intended to make or problem was it designed to solve?</p>
        <br>

        <p class="label1">What went well? *</p>
        <textarea name="WhatWell"></textarea>
        <p class="help-block">A brief outline of what worked well for you/ your organisation. What were the highlights? Did you receive any positive feedback?</p>
        <br>

        <p class="label1">What might you have done differently? *</p>
        <textarea name="WhatDifferently"></textarea>
        <p class="help-block">A brief outline of any particular challenges faced and how these were addressed. Please also say if you are planning any changes or further developments.</p>
        <br>

        <p class="label1">Scalability and transferability *</p>
        <textarea name="Scalability"></textarea>
        <p class="help-block">Is this practice scalable and transferable? What is the potential for it being expanded and/or run elsewhere in the University? A brief outline of workload commitments in setting up and maintaining the practice would also be useful.</p>
        <br>   

        <p class="label1">Further information *</p>
        <textarea name="FurtherInfo"></textarea>
        <p class="help-block">e.g. website or publications, materials used, presentation slides, screen shots, testimonials. A couple of quotes from community members, students or staff illustrating the case study would be particularly useful.</p>
        <br>  

        <p class="label1">Location of practice *</p>
        <textarea name="Location"></textarea>
        <p class="help-block">Name of community partner, academic School/ support service involved (if applicable).</p>
        <br> 
<div id="author1" class="clonedInput">
<p id="author" class="label1">Author </p>
<div class="row">
    <div class="col-md-1 col-sm-6 col-xs-4">
        <input id="title" name="title" type="text" placeholder="" class="input_title textboxstyle">
        <p id="help-block-title" class="help-block-title">Title</p>
    </div>
    <div class="col-md-2">
        <input id="first_name" name="first_name" type="text" placeholder="" class="input_fn textboxstyle">
        <p id="help-block-fn" class="help-block-fn">First Name</p>
    </div>
    <div class="col-md-2">
        <input id="last_name" name="last_name" type="text" placeholder="" class="input_ln textboxstyle">
        <p id="help-block-ln" class="help-block-ln">Last Name</p>
    </div>
    <div class="col-md-2">
        <input id="email" name="email" type="email" placeholder="abc@example.com" class="input_email textboxstyle">
        <p id="help-block-email" class="help-block-email">Email</p>
    </div>
    <div class="col-md-1 col-sm-1 col-xs-2">
        <input id="contact" name="contact" type="checkbox" value="YES" class="contact">
        <p id="help-block-checkbox" class="help-block-checkbox">Contact</p>
    </div>

   <div class="col-md-2 col-sm-2 col-xs-4">
        <input id="btnAdd" name="btnAdd" type="button" class="btn btn-info" value="Add author">
    </div>
    <div class="col-md-2 col-sm-2 col-xs-3">
        <input id="btnDel" name="btnDel" type="button" class="btn btn-danger" value="Remove author">
    </div>
   </div>
</div>

        <p class="label1">Date*</p>
        <div>
        <div class="datebox">
            <input id="date" class="date" name="engagement">
            <p class="help-block">When the engagement activity took place</p>
        </div>    
        </div>
        <div>
        <p class="label1">Note for authors</p>
            <div>
            <input name="note1" type="checkbox" value="YES"><p class="prg-text"> 1) The full case study (in this template format) will be included on a public wiki database.</p>
            </div>
            <div>
            <input name="note2" type="checkbox" value="YES"><p class="prg-text"> 2) The Student Community Engagement team will produce a summary version of each case study suitable for an external and internal audience. Authors will be asked to approve these public versions of their case studies before they are made available on open websites. These case studies will be available as .pdf downloads and other formats suitable for printing and inclusion in publications, as web pages and for presentations. These will be available on the public section of the Student Community Engagement website and linked to other key sites.</p> 
            </div>

        <p class="help-block">The case study will be used in two ways and consent of author is required for both.</p>    
        </div>  

        <br><br>

<input class="submit btn btn-primary" type="submit" name="submit" value="submit">

</div>  

</form>
</body>
.
.
<div>
  <p class="label1">Links to key themes/topics *</p>
  <div class="checkbox">
      .
            .
      <input type="checkbox" onclick="toggle('Other_theme')" name="Other" > Other<br/>
      <div id="other_theme" style="display:none;">
        <input type="text" class="singleline1" id="Other_theme" name="Other_theme" required="">
      </div>
  </div>  
</div>
.
.
<form action="PHP/submit-test.php" method="POST" onsubmit="return checkValidation();">
.
.
<div>
  <p class="label1">Links to key themes/topics *</p>
  <div class="checkbox">
      .
            .
      <input type="checkbox" onclick="toggle('Other_theme')" name="Other" value="Other"> Other<br/>
      <div id="other_theme" style="display:none;">
        <input type="text" class="singleline1" id="Other_theme" name="Other_theme">
      </div>
  </div>  
</div>
.
.
<script>
function checkValidation() 
{
        var OtherVal = $("input[name='Other']:checked").val();
        if(OtherVal == 'Other')
        {
            alert("Please Fill Other Theme");
            return false;
        }
}
</script>
<script>
function checkValidation() 
{
        var OtherVal = $("input[name='Other']:checked").val();
        var OtherThemeValue = $("#Other_theme").val();
        if(OtherVal == 'Other' && OtherThemeValue=="")
        {
            alert("Please Fill Other Theme");
            return false;
        }
}
</script>