I am pretty new at rails and seem to be stuck on an issue. Trying to find a way to get me app admin to create a form on our rails app. These would include: - Select form control type - Select required validation - Select price change if selected How should I even start going at this? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 10 January 2011 14:46, RogerM <rmiranda-QZfty/PGBGtjLKMleX6X9g@public.gmane.org> wrote:> I am pretty new at rails and seem to be stuck on an issue. > > Trying to find a way to get me app admin to create a form on our rails > app. These would include: > - Select form control typeWhat is a form control type?> - Select required validationWhat does that mean> - Select price change if selectedDon''t understand that either, sorry. In fact I don''t understand what you mean by the app admin *creating* a form. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> What is a form control type? > > > - Select required validation > > What does that mean > > > - Select price change if selected > > Don''t understand that either, sorry. > In fact I don''t understand what you mean by the app admin *creating* a form.Hi Colin, sorry I am probably not using proper terminology. I have a subdomin type rails application. I am trying to get the administrator users of the subdomain account to create an HTML form, something similar to phpform.org. Roger -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Can anyone shed some details or point me in the correct direction? In a nutshell I am trying to get the users in my app to create and use web forms. I found a great jQuery example, I just have no idea how-to save the form structure to db then render it and saving users answers/ options to the rendered form. Roger On Jan 10, 11:17 am, RogerM <rmira...-QZfty/PGBGtjLKMleX6X9g@public.gmane.org> wrote:> > What is a form control type? > > > > - Select required validation > > > What does that mean > > > > - Select price change if selected > > > Don''t understand that either, sorry. > > In fact I don''t understand what you mean by the app admin *creating* a form. > > Hi Colin, sorry I am probably not using proper terminology. I have a > subdomin type rails application. I am trying to get the administrator > users of the subdomain account to create an HTML form, something > similar to phpform.org. > > Roger-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Not sure if it''s the best way, but here''s an idea. For each custom form, use some combination of serialized db fields (one to hold the form meta-data (field-types, field names, etc.) and a corresponding field to hold the data. Garrett Lancaster> RogerM <mailto:rmiranda-QZfty/PGBGtjLKMleX6X9g@public.gmane.org> > January 18, 2011 8:39 AM > > > Can anyone shed some details or point me in the correct direction? > > In a nutshell I am trying to get the users in my app to create and use > web forms. I found a great jQuery example, I just have no idea how-to > save the form structure to db then render it and saving users answers/ > options to the rendered form. > > Roger > > > ------------------------------------------------------------------------ > > RogerM <mailto:rmiranda-QZfty/PGBGtjLKMleX6X9g@public.gmane.org> > January 10, 2011 11:17 AM > > > > > Hi Colin, sorry I am probably not using proper terminology. I have a > subdomin type rails application. I am trying to get the administrator > users of the subdomain account to create an HTML form, something > similar to phpform.org. > > Roger > > > > ------------------------------------------------------------------------ > > Colin Law <mailto:clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> > January 10, 2011 10:21 AM > > > On 10 January 2011 14:46, RogerM<rmiranda-QZfty/PGBGtjLKMleX6X9g@public.gmane.org> wrote: >> I am pretty new at rails and seem to be stuck on an issue. >> >> Trying to find a way to get me app admin to create a form on our rails >> app. These would include: >> - Select form control type > > What is a form control type? > >> - Select required validation > > What does that mean > >> - Select price change if selected > > Don''t understand that either, sorry. > In fact I don''t understand what you mean by the app admin *creating* a form. > > Colin > > ------------------------------------------------------------------------ > > RogerM <mailto:rmiranda-QZfty/PGBGtjLKMleX6X9g@public.gmane.org> > January 10, 2011 8:46 AM > > > I am pretty new at rails and seem to be stuck on an issue. > > Trying to find a way to get me app admin to create a form on our rails > app. These would include: > - Select form control type > - Select required validation > - Select price change if selected > > How should I even start going at this? >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Garrett Lancaster wrote in post #975922:> Not sure if it''s the best way, but here''s an idea. For each custom form, > use some combination of serialized db fields (one to hold the form > meta-data (field-types, field names, etc.) and a corresponding field to > hold the data.If you''re using a relational database, I think it would actually be better to have Form, Field, ValueSet, and Value models (and associated tables): class Form < AR::B has_many :fields has_many :records class Field < AR::B belongs_to :form has_many :values class Record < AR::B belongs_to :form # maybe belongs_to :user or something has_many :values class Value < AR::B belongs_to :field belongs_to :record (Record is my ad-hoc term for one user''s response, filling in all form fields. There may be a better name. Also, some :throughs in there may make life easier, depending on the use case.) This might be a good candidate for a non-relational solution such as MongoDB.> > Garrett LancasterBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser wrote in post #975923:> Garrett Lancaster wrote in post #975922: >> Not sure if it''s the best way, but here''s an idea. For each custom form, >> use some combination of serialized db fields (one to hold the form >> meta-data (field-types, field names, etc.) and a corresponding field to >> hold the data. > > If you''re using a relational database, I think it would actually be > better to have Form, Field, ValueSet, and Value models (and associated > tables):Er, sorry. I changed ValueSet to Record and missed that instance.> > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser wrote in post #975923:> If you''re using a relational database, I think it would actually be > better to have Form, Field, ValueSet, and Value models (and associated > tables)I would agree, especially if you''re going to use this concept in a variety of circumstances. If it''s just one customization on one model then I might be inclined to go the other way in some cases. Debatable. Garrett Lancaster> ------------------------------------------------------------------------ > > Marnen Laibow-Koser <mailto:lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > January 18, 2011 9:12 PM > > > > > Er, sorry. I changed ValueSet to Record and missed that instance. >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > ------------------------------------------------------------------------ > > Marnen Laibow-Koser <mailto:lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > January 18, 2011 9:12 PM > > > Garrett Lancaster wrote in post #975922: >> Not sure if it''s the best way, but here''s an idea. For each custom form, >> use some combination of serialized db fields (one to hold the form >> meta-data (field-types, field names, etc.) and a corresponding field to >> hold the data. > > If you''re using a relational database, I think it would actually be > better to have Form, Field, ValueSet, and Value models (and associated > tables): > > class Form< AR::B > has_many :fields > has_many :records > > class Field< AR::B > belongs_to :form > has_many :values > > class Record< AR::B > belongs_to :form > # maybe belongs_to :user or something > has_many :values > > class Value< AR::B > belongs_to :field > belongs_to :record > > (Record is my ad-hoc term for one user''s response, filling in all form > fields. There may be a better name. Also, some :throughs in there may > make life easier, depending on the use case.) > > This might be a good candidate for a non-relational solution such as > MongoDB. > > >> Garrett Lancaster > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > ------------------------------------------------------------------------ > > Garrett Lancaster <mailto:glancast-jmyiO2ngOJdad6c/EObmYVaTQe2KTcn/@public.gmane.org> > January 18, 2011 9:02 PM > > > Not sure if it''s the best way, but here''s an idea. For each custom > form, use some combination of serialized db fields (one to hold the > form meta-data (field-types, field names, etc.) and a corresponding > field to hold the data. > > Garrett Lancaster > ------------------------------------------------------------------------ > > RogerM <mailto:rmiranda-QZfty/PGBGtjLKMleX6X9g@public.gmane.org> > January 18, 2011 8:39 AM > > > Can anyone shed some details or point me in the correct direction? > > In a nutshell I am trying to get the users in my app to create and use > web forms. I found a great jQuery example, I just have no idea how-to > save the form structure to db then render it and saving users answers/ > options to the rendered form. > > Roger > > > ------------------------------------------------------------------------ > > RogerM <mailto:rmiranda-QZfty/PGBGtjLKMleX6X9g@public.gmane.org> > January 10, 2011 11:17 AM > > > > > Hi Colin, sorry I am probably not using proper terminology. I have a > subdomin type rails application. I am trying to get the administrator > users of the subdomain account to create an HTML form, something > similar to phpform.org. > > Roger > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 18, 9:12 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> If you''re using a relational database, I think it would actually be > better to have Form, Field, ValueSet, and Value models (and associated > tables):Thanks I am going to give that a try. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.