Example #1
0
					<?php 
if (!$detail == "") {
    ?>
					<br>
					<b>Area Information</b>
					<table border="1">
							<tr>
								<td>Area</td>
								<td>Type</td>
								<td>Size</td>
							</tr>
							<?php 
    $i = 1;
    foreach ($detail as $det) {
        echo "<tr>";
        echo "<td>Area " . $i . "</td><td>" . AreaType::model()->findByPk($det->area_type)->name . "</td><td>" . $det->area_size . "</td>";
        echo "</tr>";
        $i += 1;
    }
    ?>
					</table>
					<?php 
}
?>
					</p>
				</td>
			</tr>
			<tr >
				<td style="padding:10px 0 0 20px;color:white  !important;">
					Thanks in advance for giving vvfy a try ! 
					<br>Find out more at <a style="color:white" href="http://vvfy.me">http://vvfy.me</a> or on twitter @vvfy
Example #2
0
<?php 
echo $form;
for ($i = 1; $i <= $count; $i++) {
    ?>
 
	<div class='row row-areas' id='row-area-<?php 
    echo $i;
    ?>
'>
		<div class='label'><span class='helper'>Area <?php 
    echo $i;
    ?>
</span></div>	
		<div class='value'>
			<?php 
    echo $form->dropDownList($calc, 'area_type', CHtml::listData(AreaType::model()->findAll(), 'id', 'name'), array('empty' => 'Choose Area Type', 'class' => 'area-type'));
    ?>
			<?php 
    echo $form->textField($calc, 'area_size', array('onkeypress' => 'return AllowNumbersOnly(event)'));
    ?>
		</div>
	</div>
<?php 
}
Example #3
0
		                        }                     
							}	
				        },
				        'error': function (data) {
				        	alert(data.responseText);
				            alert("Error occured. Try again later");
				        },
					});		
					
			    });


			  $('#row-interior-areas').keyup(function(e){
			  		var options = "<?php 
echo '<option>Choose Area Type</option>';
foreach (AreaType::model()->findAll() as $option) {
    echo '<option value=' . $option->id . '>' . $option->name . '</option>';
}
?>
"
		  			$( ".row-areas" ).remove();
					var count = $(".input-interior-areas").val();
					var html = '';
					for (var i = 0; i < count; i++) {
						html += "<div class='row row-areas' id='row-area-"+(i+1).toString()+"'><div class='label'><span class='helper'>Area "+(i+1).toString()+"</span></div>"
									+"<div class='value'>"
										+"<select class='area-type' id='at-"+(i+1).toString()+"' name='CalculationDetail["+(i).toString()+"][area_type]'>"
											+options+
										+"</select>"
										+"<input class='area-size' id='as-"+(i+1).toString()+"' name='CalculationDetail["+(i).toString()+"][area_size]' type='text' placeholder='Area Size'>"
									+"</div>"