Jolly evening, good people!
I’m new to Jot, and I’m having major problems using custom fields with this snippet... I just don’t get how it works...
Here’s my snippet call:
[[Jot? &subscribe=`0` &pagination=`10` &customfields=`where,status,url` &tplForm=`SVN_newBug` &tplComments=`SVN_posts`]]
Here’s my SVN_newBug template, which holds the post form:
<a name="jf[+jot.link.id+]"></a>
<form method="post" action="[+form.action:esc+]#jf[+jot.link.id+]" class="jot-form">
<fieldset>
<input name="JotForm" type="hidden" value="[+jot.id+]" />
<input name="JotNow" type="hidden" value="[+jot.seed+]" />
<input name="parent" type="hidden" value="[+form.field.parent+]" />
[+form.moderation:is=`1`:then=`
<div class="jot-row">
<b>Skrevet:</b> [+form.field.createdon:date=`%a %B %d, %Y at %H:%M`+]<br />
<b>Skrevet av :</b> [+form.field.createdby:userinfo=`username`:ifempty=`[+jot.guestname+]`+]
<br />
<b>Publisert:</b> [+form.field.published:select=`0=No&1=Yes`+]<br />
[+form.field.publishedon:gt=`0`:then=`
<b>Published on:</b> [+form.field.publishedon:date=`%a %B %d, %Y at %H:%M`+]<br />
<b>Publisert av:</b> [+form.field.publishedby:userinfo=`username`:ifempty=` - `+]<br />
`+]
[+form.field.editedon:gt=`0`:then=`
<b>Edited on:</b> [+form.field.editedon:date=`%a %B %d, %Y at %H:%M`+]<br />
<b>Senere redigert av:</b> [+form.field.editedby:userinfo=`username`:ifempty=` -`+]<br />
`+]
</div>
`:strip+]
<label for="name">Ditt brukernavn:<br />
<input tabindex="[+jot.seed:math=`?+1`+]" name="name" type="text" size="40" value="[+form.field.custom.name:esc+]" />
</label>
<label for="title">Kort feilbeskrivelse:<br />
<input tabindex="[+jot.seed:math=`?+2`+]" name="title" type="text" size="40" value="[+form.field.custom.title:esc+]" />
</label>
<label for="where">Hvor oppsto feilen:<br />
<select tabindex="[+jot.seed:math=`?+3`+]" name="where">
<option value="Ordinære nettsider">Ordinære nettsider</option>
<option value="Forum">Forum</option>
<option value="Blogger">Blogger</option>
<option value="Galleri">Galleri</option>
</select>
</label>
<label for="url">Webadresse:<br />
<input tabindex="[+jot.seed:math=`?+4`+]" name="url" type="text" size="40" value="[+form.field.custom.url:esc+]" />
</label>
<label for="content">Utvidet feilbeskrivelse :<br />
<textarea tabindex="[+jot.seed:math=`?+5`+]" name="content" cols="50" rows="8">[+form.field.custom.content:esc+]</textarea>
</label>
[+form.moderation:is=`0`:then=`
<input name="status" type="hidden" value="Åpen" />
`:strip+]
[+form.moderation:is=`1`:then=`
<label for="status">Status:<br />
<select tabindex="[+jot.seed:math=`?+6`+]" name="status">
<option value="Åpen!">Åpen!</option>
<option value="Under verifisering">Under verifisering</option>
<option value="Under utbedring">Under utbedring</option>
<option value="Fullført og lukket">Fullført og lukket</option>
</select>
</label>
`:strip+]
<br />
[+jot.captcha:is=`1`:then=`
<div style="width:150px;margin-top: 5px;margin-bottom: 5px;"><a href="[+jot.link.current:esc+]"><img src="[(base_url)]manager/includes/veriword.php?rand=[+jot.seed+]" width="148" height="60" alt="If you have trouble reading the code, click on the code itself to generate a new random code." style="border: 1px solid #003399" /></a></div>
Sikkerhetskode (CAPCHA) :<br />
<input type="text" name="vericode" style="width:150px;" size="20" />
`:strip+]
<div style="float:right;width: 100px;"></div>
<input tabindex="[+jot.seed:math=`?+5`+]" name="submit" type="submit" value="[+form.edit:is=`1`:then=`Legg til feilen`:else=`Legg til feilen`+]" />
[+form.edit:is=`1`:then=`
<input tabindex="[+jot.seed:math=`?+5`+]" name="submit" type="submit" value="Avbryt" onclick="history.go(-1);return false;" />
`+]
</fieldset>
</form>
I’ll give you the SVN_posts too:
<a name="jc[+jot.link.id+][+comment.id+]"></a>
<div class="jot-row [+chunk.rowclass+] [+comment.published:is=`0`:then=`jot-row-up`+]">
<div class="jot-comment">
<div class="jot-user">
[+comment.createdby:isnt=`0`:then=`<b>`+][+comment.createdby:userinfo=`username`:ifempty=`[+comment.custom.name:ifempty=`[+jot.guestname+]`:esc+]`+][+comment.createdby:isnt=`0`:then=`</b>`+]
<br />
</div>
<div class="jot-content">
<div class="jot-posticon">
[+phx:userinfo=`lastlogin`:ifempty=`9999999999`:lt=`[+comment.createdon+]`:then=`
<img src="[(base_url)]manager/media/style/MODx/images/icons/folder_page_add.gif" width="18" height="18" alt="New comment" border="0" />
`:else=`
<img src="[(base_url)]manager/media/style/MODx/images/icons/newdoc.gif" width="16" height="16" alt="Comment" border="0" />
`:strip+]
</div>
<div class="jot-mod">
[+jot.moderation.enabled:is=`1`:then=`
<a href="[+jot.link.delete:esc+][+jot.querykey.id+]=[+comment.id+]#jotmod[+jot.link.id+]" onclick="return confirm('Are you sure you wish to delete this comment?')" title="Delete Comment"><img src="[(base_url)]manager/media/style/MODx/images/icons/event3.gif" width="16" height="16" alt="Delete Comment" border="0" /></a>
[+comment.published:is=`0`:then=`
<a href="[+jot.link.publish:esc+][+jot.querykey.id+]=[+comment.id+]#jotmod[+jot.link.id+]" onclick="return confirm('Are you sure you wish to publish this comment?')" title="Publish Comment"><img src="[(base_url)]manager/media/style/MODx/images/icons/add.png" width="16" height="16" alt="Publish Comment" border="0" /></a>
`+]
[+comment.published:is=`1`:then=`
<a href="[+jot.link.unpublish:esc+][+jot.querykey.id+]=[+comment.id+]#jotmod[+jot.link.id+]" onclick="return confirm('Are you sure you wish to unpublish this comment?')" title="Unpublish Comment"><img src="[(base_url)]manager/media/style/MODx/images/icons/delete.png" width="16" height="16" alt="Unpublish Comment" border="0" /></a>
`+]
`:strip+]
[+jot.user.canedit:is=`1`:and:if=`[+comment.createdby+]`:is=`[+jot.user.id+]`:or:if=`[+jot.moderation.enabled+]`:is=`1`:then=`
<a href="[+jot.link.edit:esc+][+jot.querykey.id+]=[+comment.id+]#jf[+jot.link.id+]" onclick="return confirm('Are you sure you wish to edit this comment?')" title="Edit Comment"><img src="[(base_url)]manager/media/style/MODx/images/icons/logging.gif" width="16" height="16" alt="Edit Comment" border="0" /></a>
`:strip+]
</div>
<span class="jot-subject">[+comment.title:limit:esc+]</span><br />
<span class="jot-poster"><b>Feil-ID: [+comment.postnumber+] <br />Postet: [+comment.createdon:date=`%a %B %d, %Y, %H:%M:%S`+]</b></span>
<hr />
<div class="jot-message">
<p>Sted: [+comment.where:esc+] </p>
<p>URL: [+comment.url:esc+] </p>
<p><i>[+comment.content:wordwrap:esc:nl2br+]</i></p>
<p><font color="#990000" size="+2">Status: <b>[+comment.status:esc+]</b></font>
</div>
<div class="jot-extra">
[+comment.editedon:isnt=`0`:then=`
<span class="jot-editby">Sist oppdatert: [+comment.editedon:date=`%B %d, %Y, %H:%M:%S`+] av [+comment.editedby:userinfo=`username`:ifempty=` * `+]</span>
`+]</div>
</div>
</div>
</div>
I think the main problem may be the way I’m calling the custom fields in SVN_posts, but I’m way out with this... Can anybody explain what I’ve done wrong? See, the custom fields appears in the form, but not in the posts. They’re just blank!
Thanks!
(ModX version: 0.9.5)