No, I don't manage the form submission.
Just use jQuery to:
1. fill in user_id
2. populate a select dropdown depending on an option on another select
3. add some titles in the form
---------- index.html ----------------
{{ extend 'modelo.html' }}
{{ =response.toolbar() }}
R_ID = {{ =session.r_id }}
{{=form}}
<script>
jQuery( document).ready( function() {
jQuery("#r_municipio__row" ).before("<h3>A - IDENTIFICAÇÃO DA
EXPLORAÇÃO</h3>")
jQuery("#r_p_nome__row" ).before("<h3>B - PRODUTOR</h3>")
jQuery("#r_user_id").val( {{ =auth.user_id or 0 }} ) // Copia valor do
user_id da sessao para o da tabela
jQuery("#r_municipio").change( function () {
$.get( "ajax_freguesia", "codconc="+ $("#r_municipio").val(),
function (result) {
$("#r_freguesia").html( result);
} )
})
});
</script>
Now I just read M.di Pierro's reply and I will try web2py 2.0.9.
Luis
On Friday, 14 September 2012 17:05:23 UTC+1, rochacbruno wrote:
>
> What do you have in your view? are you using any JavaScript to manage the
> form submission?
--