you may modify table/field attributes in the controller....i often change 
the default value of a field in a controller based on context and 
overriding the one i set in my model.

db.table.field.default = 'foo'

can be inserted into your controller before you construct the grid and you 
should be good to go.

cfh

On Monday, November 26, 2012 10:36:42 AM UTC-8, Richard wrote:
>
> When using sqlform.grid, and after clicking "add" within its list, I need 
> a way to set the default value for a field in the screen that comes next.  
> I can't do this on the database layer, the value will not be that 
> consistent.  I need a way to do this in the controller or view (preferably 
> the view).  I think I understand how this works with a normal form 
> (form.vars.field='') but I can not figure out how to do it (or if it's 
> possible) from the form sqlform.grid generates.  I already have 
> sqlform.grid "add" sending me to a custom view but I can't get any further.
>
> Apologies if I'm overlooking something obvious.
>

-- 



Reply via email to