Dynamic objects in objects

ikbenivo

Dynamic objects in objects

Beitragvon ikbenivo » Mi 15. Feb 2006, 14:20

Hi
I'm trying to find out the possibilities of the db object module. As a project, I'm trying to make a simple forum. (make topics, reply on topics)

The topics are objects (based on a class: post), made with userinput.
Code: Alles auswählen
(...)
<we:userInput name="Datum" type="date" hidden="true"/>
<we:userInput type="textinput" name="onderwerp" size="60"/>

<we:userInput type="textarea" inlineedit="true" editable="true" (...)
In a listview I list these topics. The user can click on a topic title and will get a detail page. On this page, they also have the option to reply.
This is, again, done with userInput. The replies are objects, based on a class 'relpy'.

What I'd like to have:
I would like to check the ID of the topic. Then, when a user posts a reply, the reply needs to fill that ID in a field. I can use that field later to filter only the replies made on the specific topic.
My template so far:
Code: Alles auswählen
<div id="container">
<h2>Topic: <we:var name="onderwerp"></h2>
<we:img name="reply" id="2402" xml="true" showcontrol="false" showinputs="false" /> <we:var name="Datum" type="date"/> |
<strong><we:var name="onderwerp"> </strong>


<we:var name="bericht">(ID: <we:var name="we_objectID" type="request"/>
)
<hr>

<we:condition name="condition">
<we:conditionAdd field="objectnummer" var="we_objectID" compare="="/>
</we:condition>
<ol>
<we:listview type="object" classid="22" condition="$condition">
<we:repeat>
[*] <we:field name="reply"/>

</we:repeat>
</we:listview>
</ol>
<hr>
<h3><we:img name="addreply" id="2403" xml="true" showcontrol="false" showinputs="false" /> Plaats een reactie</h3>
<we:form class="sym" type="object" id="2401" method="post" classid="22">
<we:userInput name="Datum" type="date" hidden="true"/>
<we:userInput type="textarea" inlineedit="true" editable="true" name="reply" cols="80" rows="10" autobr="on" wysiwyg="on" commands="bold,italic,link"/>
<? $aap= $_REQUEST["we_objectID"]; ?>
<we:userInput type="textinput" name="objectnummer" value="$aap" />
<p>De velden met een * moeten ingevuld worden.</p>

<p>
<input type="submit" class="submitbutton" value="Verzenden"> <input type="reset" class="submitbutton" value="Opnieuw">
</p>

</we:form>

<we:a id="2392" xml="true"><we:img name="terug" id="2404" xml="true" showcontrol="false" showinputs="false" border="0" /> Terug naar de topics</we:a>
</div>
This almost works! The only problem is the 'objectnummer' field. For some reason, this can't be dynamic filled. (well, it can, when I change the name of the field in the class, but that should be the same in order to work)

So, how can I fill this field with dynamic content?
Thanks in advance!

ikbenivo

Beitragvon ikbenivo » Do 16. Feb 2006, 15:51

Up:
Again: How can I fill a object field with dynamic content?

ikbenivo

Beitragvon ikbenivo » Mo 20. Feb 2006, 15:36

Up again!
How can I fill an object field with dynamic content?
This:

Code: Alles auswählen

	<we:userInput type="hidden" name="vraagid" value="$we_objectID"/>
Doesn't work. It won't let me fill the field "vraagid" (which is also in the class) with the dynamic "we_objectID".


Zurück zu „DB / Object Module“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste