On 10/26/05, Dave Howorth <[EMAIL PROTECTED]> wrote: > On Wed, 2005-10-26 at 11:40 -0500, Peter Speltz wrote: > > I'm running into an issue with has_a select box creation and am > > wondering what to do about it. > > > > Problem, a has_a field can be NULL. So on addnew, edit, and search > > forms i want there to be an empty select option at top. > > > > Should the function in AsForm that makes the select box for has_a > > columns look at if a column can be NULL and should add the empty > > option ? What does FormBuilder do? > > > > My other option is to override the template or action where the input > > is created . Thats a lot of overriding. > > Hi Peter, > > I'm confused. I thought your improved AsForm could handle null long ago. > We had a thread called 'AsForm again - selects?' last year. I added code > to my FormView to handle it and I thought you had too. Got to dash, > otherwise I'd check :) > > Cheers, Dave > >
Thanks Dave. I found the thread. I remember it. I had just been adding the NULL in select option in my template. I never got around to adding it to AsForm so it would automatically do it apparently. From your analysis and my new experience in using AsForm , i think it is a good idea and will put it in. Plus, it is much easier to "shift_content" from the select element than it is to unshift an new emty option should you not want the empty option. Also, there was no interface in CDBI for finding if a column NULL able or not. I remeber a thread about it. I'll use CDBI::mysql 's if there is one .. Nope. Dont matter really Maypole will take care of all this for me soon. :) > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > Maypole-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/maypole-users > -- pjs ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Maypole-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maypole-users
