solved Form Designer - Checkbox validation

Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
10 years ago
224 posts
Hi,
I want to create a checkbox for "accept the terms of service" for song uploads with the Form designer. The field must be checked, before uploading a song. How can i do this?

Greetings, Marco
updated by @bandwerkstatt: 12/27/14 02:02:29AM
douglas
@douglas
10 years ago
2,790 posts
Add a checkbox to the form with the form designer and make it required.

Hope this helps! :)


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
10 years ago
224 posts
no it don't helps, i added a checkbox and made it required. but i can upload songs without checking that box.
updated by @bandwerkstatt: 11/23/14 06:32:53AM
brian
@brian
10 years ago
10,148 posts
SelfmadeClub:
no it don't helps, i added a checkbox and made it required. but i can upload songs without checking that box.

That's because a Check box form field has 2 allowed values - "on" and "off", so I don't believe that is going to work for you. At this time I'm not sure how you would make this work but if I can think of something I will update this thread.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
10 years ago
224 posts
<input type="checkbox" name="checkbox" value="check"  />
<input type="submit" name="email_submit" value="submit" onclick="if(!this.form.checkbox.checked){alert('You must agree to the terms first.');return false}"  />

if there is a way i could use it without to impair the other onclick function. how could i integrate this?

I think i have to do some custom work directly in the jrAudio module, but don't know how.

Greetings and thanks for helping
updated by @bandwerkstatt: 11/23/14 07:01:09AM
Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
10 years ago
224 posts
brian:
SelfmadeClub:
no it don't helps, i added a checkbox and made it required. but i can upload songs without checking that box.

That's because a Check box form field has 2 allowed values - "on" and "off", so I don't believe that is going to work for you. At this time I'm not sure how you would make this work but if I can think of something I will update this thread.

Thanks!

... hope you can help, Brain.

We need it, greetz fron Germany =)
brian
@brian
10 years ago
10,148 posts
I can't think of any way for you to do this without modifying the actual jrAudio module script. Quick question - do you have to show this on EVERY song create? We have a "terms of service" module that makes a user agree to a terms of service before they can continue on with their account, which should work for you (if your goal is to ensure the user has seen your terms of service before they upload audio).

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
John Bizley
John Bizley
@john-bizley
10 years ago
251 posts
@Brian how about if the buttons to enable the uploads where hidden unless the tick box value is true then hide the tick box so it cannot be changed and reveal the upload buttons for the songs and album cover. By hiding the tick box after selection of agreeing to the terms it means they cannot just tick it to add the songs then un-tick after. If some details where also added like the terms this could also be hidden once terms are agreed upon.
brian
@brian
10 years ago
10,148 posts
John Bizley:
@Brian how about if the buttons to enable the uploads where hidden unless the tick box value is true then hide the tick box so it cannot be changed and reveal the upload buttons for the songs and album cover. By hiding the tick box after selection of agreeing to the terms it means they cannot just tick it to add the songs then un-tick after. If some details where also added like the terms this could also be hidden once terms are agreed upon.

Either way it's going to require some custom Javascript and at least a template edit (i.e. setup a ready function watching for the "create" audio URL). As a user though, I would find a system that required me to "agree" to the same terms of service over and over a bit onerous - I know why someone might want that, but I'm certain there are better ways to go about it.

However I don't know the full story here - maybe the terms change every day or frequently enough that this is the only solution.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
John Bizley
John Bizley
@john-bizley
10 years ago
251 posts
I agree Brian as most would include those terms within the main site terms and conditions on signing up so there would be no need to have another somewhere else.
Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
10 years ago
224 posts
Hello, Brain.

Excuse me, if I should have released here a discussion.

I try, a short explanation add, why this is so important for us.

It is correct, we would like to have this function to every song Upload.

Why?

Unfortunately, in Germany it is in such a way that fees must be paid provided that somebody announced musician is. Because we are, however, a newcomer main entrance and the artists are listed with no label, undertake only 100% your own self-produced music to load high. No copyright, no samples where you have no rights for it. . .

Maybe sounds a little bit weird or complex, but, unfortunately, we must protect ourselves therefore. The artist must confirm therefore every time this.

I hope, I could explain it correctly?

We must have this for every Upload!

Thank you very much, for the patience and time and the conversion.

Greetings from complicated Germany :-)
brian
@brian
10 years ago
10,148 posts
Actually I was wrong - you can do this in the Form Designer :)

- go into the Create Audio page as a Master Admin and click on the "Form Designer" button in the upper right
- create a NEW field at the bottom called "audio_tos"
- in the New Form Field form set:

- Label to whatever you want - i.e. "Agree to Terms"

- Help to whatever - a description of why they must agree to and a LINK (URL) to your terms of service

- Type to "optionlist"

- Options set to:

on|Yes - I agree to the terms

(whatever text you want there)

- Display Groups - set to what you want

- Required and Active are BOTH checked

Save...

That should do it - it won't let the form be submitted without the checkbox being checked.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Bandwerkstatt
Bandwerkstatt
@bandwerkstatt
10 years ago
224 posts
Thank you brian. That's exactly that what i want. your'e the best

Greetings, Marco
updated by @bandwerkstatt: 11/26/14 12:09:42PM
brian
@brian
10 years ago
10,148 posts
SelfmadeClub:
Thank you brian. That's exactly that what i want. your'e the best

MfG, Marco

Awesome - glad to hear it ;)

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags