MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/crm_cafsindia_com/application/views/branches/form.php
<?php
	echo form_open('branches/save/' . $PersonInfo->branch_id,array('id'=>'BranchForm','class'=>'form-inline'));
?>
<fieldset id="BranchBasicInfo">
	<div class="form-group">
		<?php
			echo form_input(
				array(
					'name'=>'BranchCode',
					'id'=>'BranchCode',
					'placeholder'=>'Enter Branch Code',
					'class'=>'form-control input-sm number',
					'value'=>$PersonInfo->branch_code
				)
			); 
		?>
	</div>
	<div class="form-group">
		<?php
			echo form_input(
				array(
					'name'=>'BranchName',
					'id'=>'BranchName',
					'placeholder'=>'Enter Branch Name',
					'class'=>'form-control input-sm alpha',
					'value'=>$PersonInfo->branch_name
				));
		?>
	</div>
	<div class="form-group">
		<?php
			echo form_input(
				array(
					'name'=>'BranchId',
					'id'=>'BranchId',
					'type'=>'Hidden',
					'class'=>'form-control input-sm',
					'value'=>$PersonInfo->branch_id
				)
			);
		?>
	</div>
</fieldset>
<?php echo form_close(); ?>
<script type="text/javascript">
	$(document).ready(function()
	{
		$(".alpha").on("keydown", function(event)
		{
		    var arr = [8,9,16,17,20,35,36,37,38,39,40,45,46];
		    for(var i = 65; i <= 90; i++)
		    {
		       arr.push(i);
		   	}
		    if(jQuery.inArray(event.which, arr) === -1)
		    {
		       event.preventDefault();
		    }
		});
		$(".number").keydown(function (e) 
		{
	  		if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
	        (e.keyCode == 65 && e.ctrlKey === true) ||
	        (e.keyCode == 67 && e.ctrlKey === true) ||
	        (e.keyCode == 88 && e.ctrlKey === true) ||
	        (e.keyCode == 86 && e.ctrlKey === true) ||
	        (e.keyCode >= 35 && e.keyCode <= 39))
	        {
	        	return;
	        }
	      	if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) 
	      	{
	     	 e.preventDefault();
	     	}
  		});
  	    $('#BranchForm').validate($.extend(
    	{
		    submitHandler: function (form)
		    {
		    	$('#submit').attr('disabled','disabled');
		        $(form).ajaxSubmit(
		        {
		        	success: function (response)
		        	{
		        		dialog_support.hide();
		            	table_support.handle_submit('<?php echo site_url($controller_name); ?>', response);
		        	},
		          	dataType: 'json'
		        });
		    },
  			rules:
  			{
  				BranchName:"required",
  				BranchCode:"required"
  			}
 		}));
	});
</script>