Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2014-12-04 17:01:47

srichards
Member
Registered: 2014-11-26
Posts: 15

Forms Module Data Collection

Does anyone know which module collects the form data and inserts into the database ?

I have a small form which is cloning rows but only the last row is updated into SQL.

[== Undefined ==]
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
     if (checkMACAddress()==true) {
     $("#test").clone().insertAfter("div.test-row:last");
     }
  });
});
	function checkMACAddress() {
               var valid = true;
                for ( var i = 0, l = document.getElementsByName("mac").length; i < l; i++ ) {
		var macAddress=document.getElementsByName("mac")[i].value;
		var macAddressRegExp=/^(?:[0-9A-F]{2}[:]?){5}(?:[0-9A-F]{2}?)$/i;

		if (macAddressRegExp.test(macAddress)==false) { //if match failed
			alert("MAC Invalid - Must be IEEE.802 example 00:3F:00:10:00:2C");
			valid=false;
		}
               }
		return valid;
	}
</script>
<hr><h3>Important Disclaimer</h3>
<label><p>Devices will automatically collect the required settings from our platform once the relevant URL has been entered. URLs are displayed once the form is submitted successfully</p></label><hr>
<h3>Account Details</h3>
<div class="row">
	<div class="columns small-4">
               <label>Destination Account Number*</label>
		[[input||type=text||name=Account||name_literal=Account||placeholder=12345||required=required]]
	</div>
</div>
<hr>
<h3>Device Details</h3>
<h5>
        <button type='button'>Add Device</button>
</h5>
<div id="test" class="test-row">
	<div class="columns small-3">
		<label>MAC - IEEE.802 Format Only</label>  
 		[[input||type=text||name=mac||name_literal=mac||placeholder=54781A139264||required=required]]
	</div>
	<div class="columns small-3">
		<label>Extension/Seat Number</label>
		[[input||type=text||name=CLI||name_literal=CLI||placeholder=200||required=required]]
	</div>
	<div class="columns small-3">
		<label>Display Name</label>
		[[input||type=text||name=CLI||name_literal=Account||placeholder=reception desk]]
	</div>
	<div class="columns small-3">
		<label>Make</label>
                [[combobox||name=Product||name_literal=Type||required=required||options=Cisco PAP2T#Cisco SPA112#Cisco SPA122#Cisco SPA301#Cisco SPA303#Cisco SPA501G#Cisco SPA502G#Cisco SPA504G#Cisco SPA508G#Cisco SPA509G#Cisco SPA512G#Cisco SPA514G#Cisco SPA525G#Cisco SPA525G2#Cisco SPA921#Cisco SPA922#Cisco SPA941#Cisco SPA942#Cisco SPA962#Cisco SPA2102#Panasonic KX-UT123#Panasonic KX-UT133#Panasonic KX-TGP500#Polycom SoundPoint IP300#Polycom SoundPoint IP301#Polycom SoundPoint IP320#Polycom SoundPoint IP321#Polycom SoundPoint IP331#Polycom SoundPoint IP335#Polycom SoundPoint IP430#Polycom SoundPoint IP450#Polycom SoundPoint IP500#Polycom SoundPoint IP501#Polycom SoundPoint IP550#Polycom SoundPoint IP560#Snom 300#Snom 320#Snom 360#Snom 370#Snom 710#Snom 715#Snom 720#Snom 760#Snom 820#Snom 821#Snom 870#Snom M9#Snom MP#Yealink T19P#Yealink T20P#Yealink T21P#Yealink T22P#Yealink T26P#Yealink T28P#Yealink T32G#Yealink T38G#Yealink T41PN#Yealink T42GN#Yealink T46GN#Yealink T48GN#Yealink W52P#Yealink VP530]]
	</div><br><hr>		
</div>
<hr>
<label>[[input||type=checkbox||name=CheckboxAccept||name_literal=Acceptance||required=required]]<b> I am aware that charges may apply for provisioning devices not originating through the network</b></label>

Offline

#2 2014-12-05 05:54:38

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Forms Module Data Collection

Offline

#3 2014-12-09 10:10:26

srichards
Member
Registered: 2014-11-26
Posts: 15

Re: Forms Module Data Collection

wow thanks :-)

This is over my head !! anyone know if i can work-around without changing core files ?
It looks like the form $post is cleaned by ezcomponents.

Offline

Board footer