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.
I'm trying to use an address field in a custom edit form and I think it is not possible because a form element type address doesn't exists.
Would it be possible to develop one?
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedI would accept such a patch.
Comment #3
ytsurkAs I don't want to use Eform ..
I'm missing that too ... and I guess this would be a FormElement.
Comment #4
nikathoneThis feature was also requested for drupal.org/project/addressfield at #970048: Define and use addressfield as a form element type
Comment #5
dwwThanks. Adding that as a related issue for more visibility.
Cheers,
-Derek
Comment #7
bojanz CreditAttribution: bojanz at Centarro for Adapt commentedDone! :)
Comment #9
dwwFYI: this might not be working properly. See #2848747: Address form element doesn't work on forms without #tree => TRUE
Comment #10
bojanz CreditAttribution: bojanz at Centarro for Adapt commentedI have it working on multiple forms, Commerce and non-Commerce. We need to identify what makes that issue different.
Comment #11
dwwGood to know, thanks. I didn't want to re-open this issue, just add a link for interested parties.
Comment #12
dww#2848747: Address form element doesn't work on forms without #tree => TRUE is now marked as a child of this, so it doesn't need to be more generally "related" in here...
Comment #14
joshi.rohit100@bojanz this works fine on custom form except the validation part as constraint validation only works for entity not custom form