Input Type Checkbox no Value & no name submitted

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
tenkraD
Advanced
Posts: 110
Joined: 25 Jul 2017, 08:38

Input Type Checkbox no Value & no name submitted

Post by tenkraD » 16 Jan 2020, 18:58

I've made an Form with an Checkbox Input Field.
The Field name and the value will not be submitted with input type="checkbox"

Code: Select all

<div class="input-group checkbox-new">
 <input type="checkbox" class="form-control-checkbox-code"
   name="<?= $enc->attr( $this->formparam( 'testname' ) ); ?>"
   value="<?= $enc->attr( 'testvalue' ); ?>"
 />
</div>
If i change the type to input or something else it works. Is this a bug?

Thanks and good evening tenkraD

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Input Type Checkbox no Value & no name submitted

Post by aimeos » 17 Jan 2020, 11:17

The value is only submitted to the server if the checkbox is really checked. That's pure HTML and not related to Aimeos
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply