DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Advanced Form Controls  
DwZone Forum Index -> Advanced Form Controls

Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 11 to 20 of 381 (Total: 176) First |  Prev |  Next |  Last  
 Subject Author Date  
   Re: Comma checkbox, error if none selected  
View this persons public profile  Gianluigi   7:44 14 Feb 2016  
    Re: Comma checkbox, error if none selected  
View this persons public profile  Ken   8:10 25 Feb 2016  
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../../../../../Connections/Calvary.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd

Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_Calvary_STRING
MM_editCmd.CommandText = "INSERT INTO dbo.ministries (ministry_name, active, [section], custom_url, calendar_tag, internal_link, meeting_days, meeting_times, meeting_location, meeting_notes, icon, header_image, external_link, contact, email, phone, web_contact, web_email, web_phone, headings, facebook, twitter, instagram, youtube, short_desc, who, what, web_content, comments) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("ministry_name")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 5, 1, -1, MM_IIF(Request.Form("active"), 1, 0)) ' adDouble
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 5, 1, -1, MM_IIF(Request.Form("section"), Request.Form("section"), null)) ' adDouble
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 50, Request.Form("custom_url")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 50, Request.Form("calendar_tags")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 50, Request.Form("internal_link")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 202, 1, 255, Request.Form("meeting_days")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 202, 1, 255, Request.Form("meeting_times")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 202, 1, 255, Request.Form("meeting_location")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 202, 1, 255, Request.Form("meeting_notes")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 202, 1, 255, Request.Form("icon")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param12", 202, 1, 255, Request.Form("header_image")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param13", 202, 1, 50, Request.Form("external_link")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param14", 202, 1, 50, Request.Form("contact")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param15", 202, 1, 50, Request.Form("email")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param16", 202, 1, 50, Request.Form("phone")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param17", 202, 1, 50, Request.Form("web_contact")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param18", 202, 1, 50, Request.Form("web_email")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param19", 202, 1, 50, Request.Form("web_phone")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param20", 202, 1, 255, Request.Form("headings")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param21", 202, 1, 255, Request.Form("facebook")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param22", 202, 1, 255, Request.Form("twitter")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param23", 202, 1, 255, Request.Form("instagram")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param24", 202, 1, 255, Request.Form("youtube")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param25", 201, 1, -1, Request.Form("short")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param26", 201, 1, -1, Request.Form("who")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param27", 201, 1, -1, Request.Form("what")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param28", 201, 1, -1, Request.Form("web_content")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param29", 201, 1, -1, Request.Form("comments")) ' adLongVarChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "../"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<%
Dim rsData__MMColParam
rsData__MMColParam = "0"
If (Request.QueryString("ministry_id") <> "") Then
rsData__MMColParam = Request.QueryString("ministry_id")
End If
%>
<%
Dim rsData
Dim rsData_cmd
Dim rsData_numRows

Set rsData_cmd = Server.CreateObject ("ADODB.Command")
rsData_cmd.ActiveConnection = MM_Calvary_STRING
rsData_cmd.CommandText = "SELECT * FROM dbo.data_ministries WHERE ministry_id = ?"
rsData_cmd.Prepared = true
rsData_cmd.Parameters.Append rsData_cmd.CreateParameter("param1", 5, 1, -1, rsData__MMColParam) ' adDouble

Set rsData = rsData_cmd.Execute
rsData_numRows = 0
%>
<%
Dim rsGroups__MMColParam
rsGroups__MMColParam = "show_group"
If (Request("MM_EmptyValue") <> "") Then
rsGroups__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim rsGroups
Dim rsGroups_cmd
Dim rsGroups_numRows

Set rsGroups_cmd = Server.CreateObject ("ADODB.Command")
rsGroups_cmd.ActiveConnection = MM_Calvary_STRING
rsGroups_cmd.CommandText = "SELECT * FROM dbo.options WHERE category = ? ORDER BY option_order ASC"
rsGroups_cmd.Prepared = true
rsGroups_cmd.Parameters.Append rsGroups_cmd.CreateParameter("param1", 200, 1, 50, rsGroups__MMColParam) ' adVarChar

Set rsGroups = rsGroups_cmd.Execute
rsGroups_numRows = 0
%>
<!DOCTYPE html>
<html lang="en">
<head>
<script language="javascript" src="../../../../../dwzFormControls/FormControls.js" type="text/javascript"></script>
<!--#include file="../../../../../dwzFormControls/FormControl.asp" -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Calvary Murrieta</title>

<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,100,300,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Oxygen:400,300' rel='stylesheet' type='text/css'>

<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="../../../../../css/custom.css">
<link rel="stylesheet" type="text/css" href="../../../../css/admin.css">

<link rel="stylesheet" type="text/css" href="../../../../../css/ie10-viewport-bug-workaround.css">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="admin ministries">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<!--#include file="../../../../../includes/nav-bar.html" -->
</div>
</nav>

<div style="margin-top:50px;" class="container parent"><!-- container -->
<div class="content row"><!-- content row-->
<div class="col-sm-3">
<!--#include file="../../../../includes/left-menu-admin.html" -->
</div>
<div class="col-sm-9">
<h2 class="section-head">Calvary Murrieta Administration</h2>
<h3 class="section-head">Add Ministry</h3>
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1">
<table class="table table-striped">
<tr valign="baseline">
<td align="left" valign="top" nowrap>Ministry name:</td>
<td align="left" valign="top"><input type="text" name="ministry_name" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Active</td>
<td align="left" valign="top"><input name="active" type="checkbox" id="active" checked></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Alpha listing:</td>
<td align="left" valign="top">
<select name="section" id="section">
<option>Please select...</option>
<option value="1">A</option>
<option value="2">B</option>
<option value="3">C</option>
<option value="4">D</option>
<option value="5">E</option>
<option value="6">F</option>
<option value="7">G</option>
<option value="8">H</option>
<option value="9">I</option>
<option value="10">J</option>
<option value="11">K</option>
<option value="12">L</option>
<option value="13">M</option>
<option value="14">N</option>
<option value="15">O</option>
<option value="16">P</option>
<option value="17">Q</option>
<option value="18">R</option>
<option value="19">S</option>
<option value="20">T</option>
<option value="21">U</option>
<option value="22">V</option>
<option value="23">W</option>
<option value="24">X</option>
<option value="25">Y</option>
<option value="26">Z</option>
</select></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Custom URL:</td>
<td align="left" valign="top"><input name="custom_url" type="text" id="custom_url" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Calendar tags:</td>
<td align="left" valign="top"><input name="calendar_tags" type="text" id="calendar_tags" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Parent ministry:</td>
<td align="left" valign="top"><input type="text" name="internal_link" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Meeting days:</td>
<td align="left" valign="top"><input name="meeting_days" type="text" id="meeting_days" size="50"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Meeting times:</td>
<td align="left" valign="top"><input name="meeting_times" type="text" id="meeting_times" size="50"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Meeting location:</td>
<td align="left" valign="top"><input name="meeting_location" type="text" id="meeting_location" size="50"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Meeting notes:</td>
<td align="left" valign="top"><input name="meeting_notes" type="text" id="meeting_notes" size="50"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Icon:</td>
<td align="left" valign="top"><input name="icon" type="text" id="icon" size="50"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Header Image:</td>
<td align="left" valign="top"><input name="header_image" type="text" id="header_image" size="50"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>External link:</td>
<td align="left" valign="top"><input type="text" name="external_link" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Ministry contact:</td>
<td align="left" valign="top"><input type="text" name="contact" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Email:</td>
<td align="left" valign="top"><input type="text" name="email" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Phone:</td>
<td align="left" valign="top"><input type="text" name="phone" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Web contact:</td>
<td align="left" valign="top"><input type="text" name="web_contact" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Web contat email:</td>
<td align="left" valign="top"><input type="text" name="web_email" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Web contact phone:</td>
<td align="left" valign="top"><input type="text" name="web_phone" size="35"></td>
</tr>
<tr valign="baseline">
<td align="left" valign="top" nowrap>Ministry groups:</td>
<td align="left" valign="top"><%
'****************************
' http://www.DwZone-it.com
' Advanced Form Elements
' Comma-separated Checkboxes
' Version 1.6.8
'****************************
dwz_FieldName = "headings"
dwz_Column = "1"
dwz_Recordset = "rsGroups"
dwz_FieldValue = "option_name"
dwz_FieldText = "option_name"
dwz_ValueList = ""
dwz_TableClass = ""
dwz_ChkCellClass = ""
dwz_TxtCellClass = ""

dwzCreateChkboxTable dwz_Recordset, dwz_FieldValue, dwz_FieldText, dwz_FieldName, dwz_Column, dwz_ChkCellClass, dwz_TxtCellClass, dwz_TableClass, dwz_ValueList
%> <input name="headings" type="checkbox" class="dwzDisplayNone" value= ></td>
</tr>
<tr>
<td nowrap align="left" valign="top">Facebook:</td>
<td align="left" valign="top"><input name="facebook" type="text" id="facebook" size="50"></td>
</tr>
<tr>
<td nowrap align="left" valign="top">Twitter:</td>
<td align="left" valign="top"><input name="twitter" type="text" id="twitter" size="50"></td>
</tr>
<tr>
<td nowrap align="left" valign="top">Instagram:</td>
<td align="left" valign="top"><input name="instagram" type="text" id="instagram" size="50"></td>
</tr>
<tr>
<td nowrap align="left" valign="top">YouTube:</td>
<td align="left" valign="top"><input name="youtube" type="text" id="youtube" size="50"></td>
</tr>
<tr>
<td nowrap align="left" valign="top">Short description:<br>
(used under icon)</td>
<td align="left" valign="top"><textarea name="short" cols="75" rows="5"></textarea></td>
</tr>
<tr>
<td nowrap align="left" valign="top">Who we are:</td>
<td align="left" valign="top"><textarea name="who" cols="75" rows="5"></textarea></td>
</tr>
<tr>
<td nowrap align="left" valign="top">What we do:</td>
<td align="left" valign="top"><textarea name="what" cols="75" rows="5"></textarea></td>
</tr>
<tr>
<td nowrap align="left" valign="top">Web content:</td>
<td align="left" valign="top"><textarea name="web_content" cols="75" rows="10"></textarea></td>
</tr>
<tr>
<td nowrap align="left" valign="top">Internal comments:</td>
<td align="left" valign="top"><textarea name="comments" cols="50" rows="5"></textarea></td>
</tr>
<tr valign="baseline">
<td colspan="2" align="left" valign="top" nowrap><input class="btn btn-success btn-sm" role="button" type="submit" value="Add Ministry"></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
</div>
</div><!-- /content row -->
</div> <!-- /container -->

<div class="statement"><!-- statement -->
<div class="container"><!-- container -->
<div class="row"><!-- row-->
<!--#include file="../../../../../includes/statement.html" -->
</div><!-- /row -->
</div><!-- /container -->
</div> <!-- /statement -->

<div class="footer"><!-- footer -->
<div class="container"><!-- container -->
<!--#include file="../../../../../includes/footer.html" -->
</div><!-- /container -->
</div> <!-- /footer -->


<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script type="text/javascript" src="../../../../../js/ie10-viewport-bug-workaround.js"></script>
<script type="text/javascript" src="/js/analytics.js"></script>
</body>
</html>
<%
rsData.Close()
Set rsData = Nothing
%>
<%
rsGroups.Close()
Set rsGroups = Nothing
%>

 
Reply to this current thread  View this persons public profile  Send Private Message
   Re: Comma checkbox, error if none selected  
View this persons public profile  Gianluigi   23:30 27 Feb 2016  
   Re: Comma checkbox, error if none selected  
View this persons public profile  Gianluigi   7:09 28 Feb 2016  
   Re: Comma checkbox, error if none selected  
View this persons public profile  Ken   10:09 29 Feb 2016  
   Re: Comma checkbox, error if none selected  
View this persons public profile  Ken   10:09 29 Feb 2016  
   Possible hide second select if only one option  
View this persons public profile  Ken   6:03 4 Apr 2015  
   Re: Possible hide second select if only one option  
View this persons public profile  Gianluigi   7:01 4 Apr 2015  
   Possible hide second select if only one option  
View this persons public profile  Ken   6:03 4 Apr 2015  
   Asp Depended Combo Box su 2 combo box  
View this persons public profile  Massi   16:40 5 Mar 2014  
Last Visit: Friday 27 Dec, 2024 5:32 am First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-1

Jump to: