Page 1 of 1

Download Button: only show if checkbox is ticked

PostPosted: June 1st, 2011, 11:02 am
by TomRail
Hi again,

i wanted to have my paid subscribers to "agree terms" before thy can download.
I´m not a coder.. anyway there are many examples in the web.

e.g.
http://javascript.internet.com/forms/accept-terms.html
http://www.toknowmore.net/e/1/javascript/javascript-disable-submit-button.php#
http://jsfiddle.net/vqVEF/

anyway.. i thought of something easier.

As s2member has lots of conditionals:
I´d create a checkbox for the member ship options page (agreed terms)
-> make this uneditable after checking
-> then restrict the dowload to be for e.g. members level 1 only
-> get some code around the dowload

= anything like
[s2If current_user_can(access_s2member_level1)]
Some content for Members who are logged in with an s2Member Level >= 1. my download button and code for s2member files
[/s2If]

where/how can i add something like "if custom fieldname is checked"?
where custom field name would be the checkbox from above.



Thank you in advance!
Tom

Re: Download Button: only show if checkbox is ticked

PostPosted: June 1st, 2011, 11:25 am
by Cristián Lávaque
Hi Tom.

You could try get_custom_field('custom_field_name').

Re: Download Button: only show if checkbox is ticked

PostPosted: June 1st, 2011, 11:31 am
by TomRail
Know what?

for this kind of always superfast help and assistance i would actually pay for .
(bought pro version to support your fantastic work)


Thanks!

Re: Download Button: only show if checkbox is ticked

PostPosted: June 1st, 2011, 11:45 am
by Cristián Lávaque
Thank you, Tom! :D

I'm very glad you're happy with the help you get. Let us know if you need anything else. :)