Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
Hi KK, and all.

I want an idea. How can I create A pdf download common page, when my website viewer submit some information about them ie, Mob. no. e-mail etc.

If some clever one want to access through direct url link it will redirect to Submit form page.
can member module help me.

Is there any login timeout season preset for register user in member module?

Thanks
Subhamoy
Hi Subhamoy,

Have you taken a look at 'Cloaked Links' (http://www.couchcms.com/docs/concepts/c ... links.html)?

Using that your file can never be downloaded directly.

Does this help?
Sir

I already read http://www.couchcms.com/docs/concepts/c ... links.html

with this tutorial I have to create user (already known) & access level before they download.

But I do not go through with this.

I need a code for

A unknown visitor must have to submit his/her own information (which automatically save to database) and then able to download some image or pdf file easily with this
Code: Select all
<a href="
    <cms:cloak_url
    link='http://yoursite.com/couch/uploads/file/secure/test.jpg'
    force_download='1'
    />
">Test Link</a>

I mean anyone can download but they have to give us some personal information before downland. and we keep those information for future uses.

Thanks

Subhamoy
We can modify the sample DataBound Form code quite easily for this. For example as follows
Code: Select all
<cms:set submit_success="<cms:get_flash 'submit_success' />" />

<cms:if submit_success >
    <h4>Success: Your info has been submitted.<br/>
    You can download your file now</h4>
   
    <a href="
        <cms:cloak_url
        link='http://yoursite.com/couch/uploads/file/secure/test.jpg'
        force_download='1'
        />
    ">Download</a>
   
<cms:else />   
    <cms:form
        masterpage=k_template_name
        mode='create'
        enctype='multipart/form-data'
        method='post'
        anchor='0'
        >

        <cms:if k_success >   

            <cms:db_persist_form
                _invalidate_cache='0'
                _auto_title='1'
            />               

            <cms:set_flash name='submit_success' value='1' />
            <cms:redirect k_page_link />
        </cms:if>

        <cms:if k_error >
            <div class="error">
                <cms:each k_error >
                    <br><cms:show item />
                </cms:each>
            </div>
        </cms:if>
       

        <label>First Name</label>
        <cms:input name="first_name" type="bound" />
        <br />   
       
        ...
        ...

    </cms:form>
</cms:if>   

Does this help?
Respected/Dear KK

Yes its help me.

Thank you
5 posts Page 1 of 1