Thanks guys for the replies! :)

so, I was looking to have a field updated while the form was being
filled out, which didn't work very well ;) . So I went for the more
obvious solution... i put it in the view :)

<li><a href={='http://{0}/blueLite/default/
index.html'.format(build.buildServer)}}>{{=build.buildServer}}</a></
li>


BTW - this is for another adaptation of Massimo's 'cookBook'.. instead
of storing recipes by category, it stores and displays build servers
and build definitions by build category - still can't get over how
many uses there are for that app! :)

Thanks again,
mart :)

On Jul 22, 6:11 pm, Bruno Rocha <[email protected]> wrote:
> this -> ?http://www.web2pyslices.com/slices/take_slice/85
>
>
>
>
>
>
>
>
>
> On Fri, Jul 22, 2011 at 12:56 PM, mart <[email protected]> wrote:
> > Hi,
>
> > I would like to have a table field 'autofill' a value based on another
> > field's choice. I would like to have a link displayed depending on the
> > user's server name choice. something like this (but obviously this is
> > wrong ;) )
>
> > this is the table definition (the last validation line is the issue):
>
> > db.define_table('build',
> >                Field('title'),Field('description',length=256),
>
> > Field('category',requires=IS_IN_DB(db,db.category.name)),
> >                Field('date','date',default=datetime.datetime.now()),
>
> > Field('URL','text'),Field('buildServer',requires=IS_IN_DB(db,
> > db.buildserver.name)))
>
> > db.category.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'category.name
> > ')]
> > db.build.title.requires=[IS_NOT_EMPTY()]
> > db.build.description.requires=IS_NOT_EMPTY()
> > db.build.category.requires=IS_IN_DB(db,'category.id','category.name')
> > db.build.date.requires=IS_DATE()
> > db.build.URL='http://{0}/blueLite/default/
> > index.html'.format(db.build.buildServer)
>
> > if the user fills the form, and chooses a server from the
> > 'buildServer' field, I would like the 'URL' field to autofill with the
> > user's server choice as variable. So something like the last
> > validation line above ( db.build.URL='http://{0}/blueLite/default/
> > index.html'.format(db.build.buildServer) )
>
> > Any ideas how this can work?
>
> > thanks,
> > Mart :)
>
> --
>
> --
> Bruno Rocha
> [ About me:http://zerp.ly/rochacbruno]
> [ Aprenda a programar:http://CursoDePython.com.br]
> [ O seu aliado nos cuidados com os animais:http://AnimalSystem.com.br]
> [ Consultoria em desenvolvimento web:http://www.blouweb.com]

Reply via email to