Hi,
I don't think your solution is so bad.
But you can also work with setting a property 'eforms:fieldclass' in the cnd, or use the static
com.onehippo.cms7.eforms.hst.model.FormFieldFactory#addFieldBeanMapping to add your custom mapping from bean to field.
So there are multiple ways.
We should at least change the documentation, thanks for the feedback!
Jeroen
> 1. mycustomoverrides.cms.PasswordField.java under the hippo-addon-eforms-demo/cms/src/main/java
> directory
> 2. mycustomoverrides.cms.PasswordFieldModel.java under the hippo-addon-eforms-demo/cms/src/main/java directory
> 3. mycustomoverrides.cms.PasswordFieldPanel.java ( + PasswrodFieldPanel.html) under the
> hippo-addon-eforms-demo/cms/src/main/java directory
> 4. mycustomoverrides.cms.PasswordFieldPropertiesPanel.java ( + PasswordFieldPropertiesPanel.html +
> .properties) under the hippo-addon-eforms-demo/cms/src/main/java directory
> 5. mycustomoverrides.PasswordField.java under the hippo-addon-eforms-demo/site/src/main/java directory
> 6. mycustomoverrides.PasswordFieldBean.java under the hippo-addon-eforms-demo/site/src/main/java directory
>
> I'm able to within the CMS add a new field of type Password to a form.
>
> I also created under hst:hst/hst:configurations
>
> 1. hst:components/theresaformcomponent/theresaformcomponent
> 1. hst:componentclassname = com.onehippo.cms7.eforms.hst.components.FormStoringEformComponent
> 2. hst:parameternames =
> 1. behaviors,
> 2. eforms-mailsession,
> 3. eforms-from-name,
> 4. eforms-from-email,
> 5. eforms-to-name,
> 6. eforms-to-email,
> 7. eforms-use-freemarker,
> 8. password
> 3. hst:parametervalues =
> 1. com.onehippo.cms7.eformst.hst......
> 2. mail/Session
> 3. Webmaster
> 4.
webm...@example.org
> 5. Sales Representative
> 6.
sa...@example.org
> 7. true
> 8. mycustomoverrides.PasswordField
> 4. hst:resourcetemplate = eforms.validation.default
> 2. hst:pages/theresaformpage
> 1. main/content referenceomponent = hst:components/theresaformcomponent
> 2. main/content hst:template = passwordfield.default
> 3. hst::sitemap/theresaformsitemap
> 1. componentconfigurationid = hst:pages/theresaformpage
> 2. relativecontentpath = forms/theresa-form
> 4. hst:sitemenus/theresaformsitemenu
> 1. pointing to theresaformsitemap
> 5. hst:templates/passwrodfield.default
> 1. which is a copy of the eforms.default pointing to an identical .ftl files
>
> --
> Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
>
> To post to this group, send email to
hippo-c...@googlegroups.com
> RSS:
https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> ---
> You received this message because you are subscribed to the Google Groups "Hippo Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
>
hippo-communi...@googlegroups.com <mailto:
hippo-communi...@googlegroups.com>.
> Visit this group at
https://groups.google.com/group/hippo-community.
> For more options, visit
https://groups.google.com/d/optout.