Thread tagged as: Question, Problem, Members

Updating checkbox values in perch members app

Hi, i've got a form to update member information and I'm having trouble configuring the contact information.

I have 3 checkbox inputs for email, post and phone and users will check which ones they want to be contacted via and don't want to be contacted by and they can update this whenever they want. If you check the box it submits the value fine but when you want to uncheck one of them it doesn't remove/update the value in the members app/Database so it still stays checked if that makes sense?

Is there a better way of doing this or am i missing something? Ive tried using javascript to update the value of the checkbox before submitting but that didn't work

Here is the code for the inputs in the form:

<perch:input id="prod-servs-email" type="checkbox" label="Email" value="Email" class="radio -check" /><perch:label for="prod-servs-email">Email</perch:label>
<perch:input id="prod-servs-post" type="checkbox" label="Post" value="Post" class="radio -check" /><perch:label for="prod-servs-post">Post</perch:label>
<perch:input id="prod-servs-phone" type="checkbox" label="Phone" value="Phone" class="radio -check" /><perch:label for="prod-servs-phone">Phone</perch:label>

And where I'm outputting the fields in members app: (Im just using type="text" to test stuff out as its easier to see what value the form is submitting)

<perch:members type="text" id="prod-servs-email" label="Prod Email" listing="false" order="21" />
<perch:members type="text" id="prod-servs-post" label="Prod Post" listing="false" order="22" />
<perch:members type="text" id="prod-servs-phone" label="Prod Phone" listing="false" order="23" />


Perch Runway: 2.8.31, PHP: 5.6.32, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Darwin, cgi-fcgi
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (5.0), perch_forms (1.8.3), collection_1 (2.8.31), perch_members (1.5)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_members', 'perch_blog' );
PERCH_PATH: /Users/Xland/Desktop/congers/admin
PERCH_CORE: /Users/Xland/Desktop/congers/admin/core
PERCH_RESFILEPATH: /Users/Xland/Desktop/congers/admin/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
REQUEST_URI: /admin/core/settings/diagnostics/
DOCUMENT_ROOT: /Users/Xland/Desktop/congers
HTTP_HOST: congers

Thank you

ewe agency

ewe agency 0 points

  • 3 years ago

Hey guys, any ideas on this?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Not yet, I'll need to look into it.