Extending content/action to support pre-filling of fields

Author Message

Gabriel Ambuehl

Friday 09 September 2005 1:39:24 pm

For a project I'm working on, pre-filling of some fields of a newly created object would be really helpful.

As I gather in content/action, this currently isn't really feasible. I thought about writing my own extension to this and be done with it, but ultimately, it would be much nicer, if content/action could handle it.

What I propose is the addition of a new POST parameter (named something like "FieldsToBePrefilled[]") that will contain the field identifiers of those fields for which the script would then try to fish the pre defined values from the POST query and apply them before redirecting the user to the edit view of the newly created object.

Thoughts?

PS: Part of the reason for posting this is to ask eZ if this could be included if I was to write it?

Visit http://triligon.org

Xavier Dutoit

Saturday 10 September 2005 4:57:40 am

Hi Gabriel,

Have a look at this extension:
http://ez.no/community/contribs/hacks/object_creator

I think I've modified a wee bit to cope with more attribute types. Have to check if I commited it on pubsvn (if it's there).

X+

http://www.sydesy.com

Aladdin Mouhaimeed

Sunday 11 September 2005 1:57:23 am

Xavier,I tried Object_Creator but it didn't work,
it really work in creating new ojects, but predefined parameters have no any effect,
if it works fine with you, please tell me.

Xavier Dutoit

Sunday 11 September 2005 1:24:02 pm

I tell you: it works ;).

Have a look at the doc. I tested with a 3.5.x install (no 3.6).

X+

http://www.sydesy.com

Gabriel Ambuehl

Monday 12 September 2005 12:54:27 am

Can't you simply use all attribute types? ez already knows how to deal with them after all...

Visit http://triligon.org

Aladdin Mouhaimeed

Monday 12 September 2005 1:29:25 am

Xavier, them maybe the reason is I use 3.6.1!!! (another possible reason is I missed something, maybe)

anyway, Gabriel, have you tried this:
http://ez.no/community/contribs/hacks/one_click_new_object_and_publish_preview_hack

this worked fine with me

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.