PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Download Button: only show if checkbox is ticked

s2Member Plugin. A Membership plugin for WordPress®.

Download Button: only show if checkbox is ticked

Postby TomRail » June 1st, 2011, 11:02 am

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
User avatar
TomRail
Registered User
Registered User
 
Posts: 18
Joined: May 18, 2011

Re: Download Button: only show if checkbox is ticked

Postby Cristián Lávaque » June 1st, 2011, 11:25 am

Hi Tom.

You could try get_custom_field('custom_field_name').
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Download Button: only show if checkbox is ticked

Postby TomRail » June 1st, 2011, 11:31 am

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!
User avatar
TomRail
Registered User
Registered User
 
Posts: 18
Joined: May 18, 2011

Re: Download Button: only show if checkbox is ticked

Postby Cristián Lávaque » June 1st, 2011, 11:45 am

Thank you, Tom! :D

I'm very glad you're happy with the help you get. Let us know if you need anything else. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 3 guests

cron