New form for content

New form for content, a forum discussion on Jojo CMS. Join us for more discussions on New form for content on our General Discussion forum.

Back to Forum Index : Back to General Discussion   RSS
finz

24 Jun 2009
Posts: 5

Being a novice.... Is it possible to setup a form to enter content data example staff prophile... Then retrieve inputed content to display a list with certain fields which would link to a individual record.... How would I go about this?
Thank you in advance.
tom

Developer

tom

24 Jun 2009
Posts: 379

can you post a visual?

the input form - do you mean for adding content in the admin area.. basically like articles but for profiles?
If so, there's a plugin in svn - jojo_profile that will do that already (just tweak the template file to get the layout you want)

Or do you mean a public-facing form on the site that visitors fill in?
Harvey

Core Developer

Harvey

24 Jun 2009
Posts: 327

I have been developing a plugin (jojo_forms) which creates a public-facing form based on a database table. It's only used on one production site at present and needs tweaking but this might be what you are looking for if you don't mind dealing with beta code.

Otherwise, as Tom says jojo_profile is probably what you need.
finz

24 Jun 2009
Posts: 5

Really what i want to be able to do is set up a new table with what ever fields required then set up a page with code to display the content of the fields so instead of having a specific plugin, it is a generic plugin to dynamically develop the form for data input and data output to be placed where you want it in the site. if you had this type of virtual plugin you could just build your simple content reqirements on the run. eg. a poll system, staff lists, members prophiles etc. Purhaps a clearer way to explain it would be a way to set up a database, table and fields and then querries to display the data.
finz

24 Jun 2009
Posts: 5

sorry I din't answer your questions.... Admin to use this type of plugin to setup the form and code into the template... then content editors to fillin the form data while public can view the data....
tom

Developer

tom

24 Jun 2009
Posts: 379

ah - the automagical plugin ;)

what you describe is.. essentially what Jojo is. It has a fields table for plugin fields and templates for each of them to handle how they appear in admin, and fieldtype code to deal with input, manipulate and store it appropriately etc,
so that creating plugins and filters for any variety of content (and content inside other content), while not exactly an on-the-fly process, is pretty fly compared to coding it all by hand.

it sounds like you want a plugin generating plugin, which would indeed be cool.

For myself, I'd like a theme generating plugin that will take an Illustrator file fresh from designer-imagination-land and render it into a standards compliant Jojo template that will work in IE6.

I'd be out of a job of course, but I've got a lot of reading to catch up on anyway.

finz

24 Jun 2009
Posts: 5

Sorry if my enquire came across flippent... it was a genuine
enquiry... you say JoJo does this? Is there any tutorials about this?
Many Thanks
tom

Developer

tom

25 Jun 2009
Posts: 379

Not flippant, it would be great to have, but it's not an easy thing to create - any time you add flexibility to coding you add a lot of complexity - it might be something someone might get to for Jojo 2.

The best way to learn how plugins work is to have a look at one of the existing ones, copy it and play with the code. Jojo comes with an 'empty_plugin' plugin which is well commented to explain the basics of what all the bits do.

There's not a lot of documentation on how to build them though - Jojo is designed for people who are comfortable with either working with the existing functions, or have enough knowledge of php etc to build their own. The structure is pretty easy to understand once you've had a look at a couple of them and had a go at building one yourself. What documetation there is, is at:
http://www.jojocms.org/docs/themes-plugins-overview/
finz

25 Jun 2009
Posts: 5

Thanks Tom, I appreciate your help... i watched the video Harvey did where he added an extra field in a module form for sidebar content... which got me thinking
If you can add fields and be able to extract them then this was the basis of a generic plugin... anyway I will try developing a plugin... thanks again.
Back to Forum Index : Back to General Discussion   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.