Share » Forums » Setup & design » Manually choose which attributes to edit

Manually choose which attributes to edit

Manually choose which attributes to edit

Thursday 29 July 2004 2:06:23 am - 5 replies

Author Message

Paul Forsyth

Thursday 29 July 2004 2:47:38 am

Try this:

If you are editing something then the varaible $content_attributes will be. You need to select the correct attribute to make this work...

<form>
{let email_attribute=$content_attributes[1]}

{attribute_edit_gui attribute=$email_attribute}
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$email_attribute.id}" />

<input type="submit" name="PublishButton" />
<input type="submit" name="CancelButton" />

{/let}

</form>

Hope this helps

paul

--
http://www.visionwt.com

Roy Bøhmer

Thursday 29 July 2004 5:52:30 am

Aaah! Thanks! Things are getting clearer.
But this means the user has to press some kind of Edit or New-button first. I would like to have the form present all the time, much like the search-form (even if my first post didn't tell). The intention is to make it easy for people to subscribe to a newsletter. But if my "clear" understanding is right I have to make a content/edit-call before I will be able to publish new objects, or..?

Roy

Paul Forsyth

Thursday 29 July 2004 6:01:37 am

If you are creating new objects a call to content/edit is the best way to go. If you are making any kind of form submit you always need a way of making the form submit, so buttons (of whatever form) are needed :)

It sounds like you want something like kernel/content/tipafriend.php. Have a look at how this code works, passes information from the html to the php underneath. Objects can then be created as you need.

paul

Roy Bøhmer

Thursday 29 July 2004 6:51:57 am

Thank you. I'll look into the tip-a-friend stuff soon. I've also made a module in order to send SMS, so I might just do some adjustments to make it create new objects. Wonder why I didnt think about doint it in php before. Well, I'll blame it on the fact that everybody else is on vacation and I still sit here :-)

Brendan Pike

Sunday 31 October 2004 7:09:17 pm

I'm quite interested to know what you created regarding the SMS module. I'm wondering if anyone has created a workflow extension to SMS as well as email when triggered.

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu