Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
I am trying to create the extended comment form where commenters are allowed to upload images with repeatable functionality. But, I am unable to do it. Please help me how to make it work.

My code is
Code: Select all
<div class="upload-photos">
<cms:repeatable name='photos'>
<label for="photos">Photos :</label>   
<div class="photos-upload-view">
<cms:input type='image' name='photos' label='Upload Photos' width='400' show_preview='1' allowed_ext='jpg, jpeg, png' preview_width='80' />
</div>
</cms:repeatable>
</div>

Thank you in advance.
Hi Upadesh,

Using type 'image' (or 'file') editable region for non-admin users is not allowed owing to security concerns.
The alternative is to use type 'securefile' (search the forum and you'll find plenty of examples) instead.

Unfortunately, 'securefile' cannot be used in a repeatable fashion so you'll have to define a fixed number of such regions (e.g. 5). The user then can choose to upload up to that maximum number of images.

Hope this helps.
2 posts Page 1 of 1

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 1 guest