Forums / Developer / How users create a object

How users create a object

Author Message

Raphael Passini

Wednesday 21 November 2007 5:15:54 am

Hi,

I need to do a subscription on a event.
I heave a class called "subscription" then i need create object of this class INTO a specified event, but this need do by the user (trought the from or link).

Anyone heave an idea?

PS: Sorry my engish :(

luca maroni

Sunday 25 November 2007 11:11:31 am

Hi,

if I understood well you need to create a button on the template event allowing users to create a new subscription object. If Yes I think you can find the information you need here:

http://ez.no/ezpublish/documentation/customization/tips_tricks/editing_creating_and_removing_content_from_the_user_page

briefly you need to add a code like this into your template:

  <form method="post" action={"/content/action"|ezurl}>
    <input type="hidden" name="NodeID" value="{$node.node_id}" />
    <select type="hidden" name="ClassID" value="_SUBSCRIPTION_CLASS_ID_">
    <input type="submit" name="NewButton" value="subscribe event" />
  </form>

Ciao
Luca