Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double echo of checkbox label #7

Open
N3XT0R opened this issue Apr 7, 2015 · 2 comments
Open

double echo of checkbox label #7

N3XT0R opened this issue Apr 7, 2015 · 2 comments
Assignees
Labels

Comments

@N3XT0R
Copy link

N3XT0R commented Apr 7, 2015

When giving an Element of Type checkbox to the View-Helper "losFormRow". In Line 175 will the variable $elementString contains already a valid label, example:

var_dump($elementString); in line 173:

string '<div class="checkbox"><input type="hidden" name="blValidFrom" value="0"><label><input type="checkbox" name="blValidFrom" id="hosting_validFrom_btn" value="1">Gültigkeitsbeginn festlegen</label></div>' (length=200)

after line 179 a var_dump($markup); will give back:

string '<div class="form-group"><div class="checkbox col-xs-10 col-xs-offset-2"><label><div class="checkbox"><input type="hidden" name="blValidUntil" value="0"><label><input type="checkbox" name="blValidUntil" id="hosting_validUntil_btn" value="1">Gültigkeitsende festlegen</label></div>Gültigkeitsende festlegen</label></div></div>' (length=326)

so on this place happens a double placement of label when the given element is a checkbox.

@Lansoweb Lansoweb added the bug label Apr 27, 2015
@Lansoweb Lansoweb self-assigned this Apr 27, 2015
@Lansoweb
Copy link
Owner

I could not reproduce this issue, i have some projects with this module and some form has a checkbox with just 1 label. How are you creating the element?

@N3XT0R
Copy link
Author

N3XT0R commented Jul 9, 2015

inside of a factory class i build a new form and taking it from the service manager over a service class:

public function addValidationCheckboxElement($name = "blValidFrom", $label = "hosting_validFrom_btn"){
        $oElement = new Checkbox($name);
        $oElement->setLabel($label);
        $this->add($oElement);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants