?
Referenced as Pull Request for: # 6794
avatar mepsteinj
mepsteinj
8 Apr 2015

Steps to reproduce the issue

1- Create a checkbox field with type="checkbox"
2- Set the default value, for example: default="somevalue"

Expected result

Checkbox field NOT checked with value="somevalue"

Actual result

Checkbox field checked with value="somevalue"

System information (as much as possible)

Joomla 3.4.1

Additional comments

The value setting defines what will be submitted if checked. If "default" attribute is not defined, the default value is "1".

Currently, the only way to replace the "1" value is setting the "default" attribute, and if you do that, the field changes its state to checked.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar mepsteinj mepsteinj - open - 8 Apr 2015
avatar mepsteinj mepsteinj - change - 8 Apr 2015
Labels Removed: ?
avatar zero-24 zero-24 - change - 8 Apr 2015
Labels Added: ?
avatar Margreet137
Margreet137 - comment - 10 Apr 2015

Want to test this issue but I don't see where you created the checkbox.
If I want to check if this issue is really an issue I need some more information.
Could you be some more specific?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6712.

avatar mepsteinj
mepsteinj - comment - 10 Apr 2015

@Margreet137 quick test:
1- Change the "default" value in the "contact_email_copy" field in "components > com_contact > models > forms > contact.xml" from "0" to "test_response" (this is the value that will be submitted if checked)
2- Create a new contact or use already created one
3- Create a new contact menu and check the page. The checkbox "Send Copy to Yourself" is now "checked" and in the source you can see the "test_response" value.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6712.

avatar infograf768
infograf768 - comment - 11 Apr 2015

Maybe using the type checkboxes with only one option would work for you. I tested with this:

<field name="contact_email_copy"
            type="checkboxes"
            class="checkbox inline"
            id="contact-email-copy"
            filter="options"
            description="COM_CONTACT_CONTACT_EMAIL_A_COPY_DESC"
            label="COM_CONTACT_CONTACT_EMAIL_A_COPY_LABEL"
            >
            <option value="test_response">JYES</option>
        </field>
avatar brianteeman
brianteeman - comment - 22 Apr 2015

Please see #6794
closing here


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6712.

avatar brianteeman brianteeman - change - 22 Apr 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-04-22 14:44:35
Closed_By brianteeman

Add a Comment

Login with GitHub to post a comment