Currently I process some Webforms in a module using hook_form_alter. The code identifies the right type of form by finding a hidden field containing the module name. The combination is a lot of work and artificial.

A function calling component would be better. The component could be a variation on the markup component with a space for a function name. You call the function with the stored values then insert the returned string in the markup.

Comments

danchadwick’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

For security reasons, I don't want end-user configured function name in a component.

peterx’s picture

If the code were in a user contributed module to add a field type, what is the best existing module to use as a template?

danchadwick’s picture

Your questions doesn't relate the this issue particularly, but I would pick the component that is most similar to the component you plan to implement. For example, a textfield is pretty simple and doesn't have much special processing.