I'm trying to use hook_webform_component_insert() to store additional properties I have added to the component edit form to the database. This works fine, but when the component's parent fieldset is being cloned, since the form is not being loaded, my additional properties aren't available.

That's OK if I can retrieve the properties for the component being cloned from, but, there seems to be no way to retrieve the cid of this original component from within hook_webform_component_insert() (nor component_presave()).

Is there another way to accomplish this that I'm missing, or should the cid of the original / original parent be added to the properties of a cloned component?

Comments

Status:Active» Closed (works as designed)

I was about ready to give up and patch Webform to pass the cid of the original component, when I realised that I'd inadvertently found another solution:

By loading my module's properties into the component during hook_node_load(), they're already available during component insert making this a non-issue :)