Help about the hooks
-
Hi i havee a next form down and i want to implement with contact form 7 i am not so good in hooks so lloking for a little help:
////////////////////form/////////////////////////////////
<form method=”post” align=”middle”>
<div align=”center”>
<h1>KALKULACIJA</h1><h3><legend>Calculation</legend></h3>
<strong<label for=”broj odraslih” size=15 class=”cctm_label cctm_text” id=”cctm_label_brojodraslih”>Broj Odraslih*</label>
<input type=”number” name=”cctm_brojodraslih” class=”cctm_text ” id=”cctmbrojodraslih” min=”1″ max=”5″ value=”1″ /><strong<label for=”Broj dece” class=”cctm_label cctm_text” id=”cctm_label_brojdece”>Broj dece*</label>
<input type=”number” name=”cctm_brojdece” class=”cctm_text ” id=”brojdece” min=”0″ max=”5″ value=”0″/>Hotel cena za odrasle <?php print_custom_field( ‘hotelcenazaodrasle’ ); ?>
hotel cena za decu <?php print_custom_field( ‘hotelcenazadecu’ ); ?>
Avio karta za odrasle cena <?php print_custom_field( ‘aviokartazaodrasle’ ); ?>
Avio karta za decu cena <?php print_custom_field( ‘aviokartezadecu’ ); ?><input type=”submit” name=”Calculate” value=”Calculate” formtarget=”_self”
<?php$a = get_custom_field( ‘hotelcenazaodrasle’ );
$b = $_POST[‘cctm_brojodraslih’];
$c = get_custom_field( ‘hotelcenazadecu’ );
$d = $_POST[‘cctm_brojdece’];
$e = get_custom_field( ‘aviokartazaodrasle’ );
$f = get_custom_field( ‘aviokartezadecu’ );$hotel = ( $a * $b ) + ( $c * $d );
$aviokarte = ( $e * $b ) + ( $f * $d );
$total = ( $a * $b ) + ( $c * $d ) + ( $e * $b ) + ( $f * $d );
print ( “HOTEL $hotel
” );
print ( “AVIO KARTE $aviokarte
” );
print ( “<h3>TOTAL EUR</h3> $total
” );
?></form>
- The topic ‘Help about the hooks’ is closed to new replies.