Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi Thank you for this module.
Im using it as part of the commerce kickstart distribution
On my product variation type I have a few fields which i am trying to modify upon submission of the node creation form.
When I inspect the fields I get structures such as
field_product['und'][0]['form']['new_reference_field']['und'][0]['target_id']
But If I try code such as
node_presave($node){
$node->field_product['und'][0]['form']['new_reference_field']['und'][0]['target_id'] = 1;
}
nothing happens
What do I need to do to modify the values of the IEF?
Thank you for any help
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedImplement hook_commerce_product_presave() instead, no need to mess with the form.