posted 13 years ago
Hi,
I put two textfields on the struts2 form. I am using qxhtml theme - this is a custom theme, you could check vitavara.com. It is similar to xhtml.
The form looks like below when I start to input the data:
I leave the value in textfield1 empty and I click the submit button. I get an error that textfield1 should not be empty. Label2 and textfield2 move right because error message belonging to textfield1 is displayed in one row and the length of errormessage in bigger then textfield1, also the textfield1 width increase. The form looks like below after the submit button is pressed:
I would like to fix the width of error message like below.
Is it possible to fix the errormessage width?
I think I should modify the row in controlheader-core.ftl:
<span class="errorMessage">${error?html}</span><#t/>
If I manually modify the row like in the example below, then it works. But I would like to get a dynamic width of textfield not fixed to 100px like in te statement below.
<span class="errorMessage" style="display: inline; width: 100px">${error?html}</span><#t/>
Best regards,
javanus