Hi Leandro,

Maybe you should use javascript to achieve this, because you need to decide 
to render a field or not after "draft" is rendered.

On Thursday, 13 September 2012 14:49:27 UTC-3, ProfessionalIT wrote:
>
> Hi,
>
>    I have a form like this:
>
> _form = form.Form(
>             form.Hidden('id'),
>             form.Hidden('operation'),
>             form.Textbox('titulo', form.notnull, size="60", 
> maxlength="250", title="Titulo/Nome da Página.", description='Titulo:', 
> style="display: block;"),
>             form.Textbox('slug', size="60", maxlength="250", title="URL da 
> Página.", readonly="readonly", class_="readonly", description='URL da 
> Página:'),
>             form.Textbox('descricao_completa', form.notnull, size="60", 
> maxlength="250", title="Descrição Completa da Página.", 
> description='Descrição Completa:'),
>             form.Textbox('palavras_chaves', form.notnull, size="60", 
> maxlength="250", title="Palavras Chaves da Página separadas por vírgula.", 
> description='Palavras Chaves:'),
>             form.Dropdown('permite_comentario', [('S', 'Sim'), ('N', 
> 'Não')], title="Permite Comentários na Página ?", description='Permite 
> Comentário:'),
>             form.Dropdown('draft', [('S', 'Sim'), ('N', 'Não')], 
> title="Rascunho ?", description='Rascunho:'),
>             form.Textarea('conteudo', form.notnull, cols="70", rows="25", 
> title="Conteúdo da Página.", description='Conteúdo da Página:'),
>             form.Button('cancelar_button', html="Cancelar", type="submit", 
> onclick="javascript:history.back();", style="display: table;"),
>             form.Button('salvar_button', html="Salvar", type="submit", 
> onclick="return setMode('save');", style="display: table;"),
>             form.Button('salvar_sair_button', html="Salvar e Sair", 
> type="submit", onclick="return setMode('save');", style="display: table;"),
>             form.Button('excluir_button', html="Excluir", type="submit", 
> onclick="return setMode('delete');", style="display: table;"),
>             form.Button('visualizar_button', html="Visualizar", 
> type="button", onclick="return preview('Pagina');", style="display: 
> table;"),
>             form.Button('publicar_button', html="Publicar", type="submit", 
> onclick="return setMode('publish');", style="display: table;")
>         )
>         return _form
>
> And  I want that de visualizar_button be rendered only if the draft field 
> value is equals 'S'. How to implement this ?
>
> thank's 
> Leandro.
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/webpy/-/j8QZW4xeOpkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to