hi, anyone can help me.
i have an gravity form. and need to send some value to a php function that calc a price.
im using this in confirmations:
<form method='POST' id='gform_2' action='https://www....prices.php'>
<input type='hidden' name='sacado' value='{Nome completo para certificado:1}'/>
<input type='hidden' name='endereco1' value='{Endere?o e Bairro:6}'/>
<input type='hidden' name='endereco2' value='{Cidade:7}'/>
<input type='hidden' name='categoria' value='{Categoria:12}'/>
<input type='hidden' name='pontuacao_cna' value='14'>
</form>
<script type="text/javascript">
jQuery("#gform_2").submit();
</script>
and in the price php i have this funcion (part of this):
$valor = number_format(calcula_preco($d,$categoria,$pontuacao_cna),2,',','.');
$categoria = 1;
$nosso_numero = incrementa_numero($sacado,$email);
function calcula_preco($d,$categoria,$pontuacao_cna){
$categoria = trim($categoria);
if(strtotime($d) <= strtotime('2014-04-01')){
$preco = '500';
}else{
$preco = '500';
}
if($categoria == 'Medicos Socios Quites'){
if(strtotime($d) <= strtotime('2014-04-01')){
$preco = '400';
}else{
$preco = '400';
}
}
if($categoria == 'Medicos Socios Nao Quites'){
if(strtotime($d) <= strtotime('2014-04-01')){
$preco = '500';
}else{
$preco = '500';
}
}
if($categoria == 'Nao Socios'){
if(strtotime($d) <= strtotime('2014-04-01')){
$preco = '500';
}else{
$preco = '500';
}
}
if($categoria == 'Residentes'){
if(strtotime($d) <= strtotime('2014-04-01')){
$preco = '250';
}else{
$preco = '250';
}
}
if($categoria == 'Outros'){
if(strtotime($d) <= strtotime('2014-04-01')){
$preco = '250';
}else{
$preco = '250';
}
}
$pontuacao_cna = trim($pontuacao_cna);
if($pontuacao_cna == 'CNA'){
$preco = $preco + 25;
}
return $preco;
}
in form, if user check ‘pontuacao cna’ the function must plus 25 usd in price. but is does not works.
any idea, anyone can help me?
thanks!