如何从hybris中的formElement:formInputBox获取值?

How to get the value from the formElement:formInputBox in hybris?

formElement:formInputBox是一种输入框。突然我找不到他们的文档。对它们应用 id 字段会破坏代码。我需要获取表单中的值

您尝试过 idKey 设置 ID 吗?例如

<formElement:formInputBox idKey="profile.email" labelKey="profile.email" path="email" inputCSS="text" mandatory="true"/>

此外,查看此文件以获取更多信息:

  • /yacceleratorstorefront/web/webroot/WEB-INF/tags/responsive/formElement/formInputBox.tag

你可以这样用。

<form:form method="post" commandName="forgottenPwdForm">
        <formElement:formInputBox idKey="forgottenPwd.email" labelKey="forgottenPwd.email" path="email" inputCSS="text" mandatory="true"/>
        <button class="positive" type="submit"><spring:theme code="forgottenPwd.submit"/></button>
    </form:form>

要支持这个你应该 formElement.tag