symfony-bundle icon indicating copy to clipboard operation
symfony-bundle copied to clipboard

[EditInPlace] with Forms more than 1 select in a row, crops out "middle" html

Open webmasterMeyers opened this issue 7 years ago • 0 comments

I am using Symfony 4.2 with Twig and Symfony forms.

On any page with more than one select input in a row, most of the html is being removed.

eg.

    <div>
        <label for="family_record_house_typeOfHome" class="required">Type of home</label>
        <select id="family_record_house_typeOfHome" name="family_record_house[typeOfHome]" required="required">
            <option value="">please select</option>
            <option value="4">apartment</option>
            <option value="7">boarding</option>
            <option value="2">foster home</option>
        </select>
    </div>
    <div>
        <label for="family_record_house_rentedOwned" class="required">Rented owned</label>
        <select id="family_record_house_rentedOwned" name="family_record_house[rentedOwned]" required="required">
            <option value="">please select</option>
            <option value="2" selected="selected">owned</option>
            <option value="1">rented</option>
        </select>
    </div>
    <div>
        <label for="family_record_house_accessToWater" class="required">Access to water</label>
        <select id="family_record_house_accessToWater" name="family_record_house[accessToWater]" required="required">
            <option value="">please select</option>
            <option value="4">municipal water</option>
            <option value="1">none</option>
            <option value="5" selected="selected">private pump</option>
            <option value="3">public or bore well</option>
            <option value="2">stream or pond</option>
        </select>
    </div>

becomes

    <div>
        <label for="family_record_house_typeOfHome" class="required">
            <x-trans data-domain="messages" data-key="messages|Type of home" data-locale="en" data-plain="Type of home" data-value="Type of home">Type of home</x-trans>
        </label>
        <select id="family_record_house_typeOfHome" name="family_record_house[typeOfHome]" required="required">
            <option value="">stream or pond</option>
        </select>
    </div>
    <div>

So everything from the first select to the last option is being removed.

I have no idea how this works, but if I had to guess, a regex somewhere needs to have a ? added to "match as few as possible"

webmasterMeyers avatar Jan 14 '19 14:01 webmasterMeyers