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

jmsosso created an issue. See original summary.

bojanz’s picture

Version: 8.x-1.0-beta2 » 8.x-1.x-dev

I would accept such a patch.

ytsurk’s picture

As I don't want to use Eform ..

I'm missing that too ... and I guess this would be a FormElement.

nikathone’s picture

This feature was also requested for drupal.org/project/addressfield at #970048: Define and use addressfield as a form element type

dww’s picture

Thanks. Adding that as a related issue for more visibility.

Cheers,
-Derek

  • bojanz committed 305d9a2 on 8.x-1.x
    Issue #2689089 by bojanz: Define a form element type "address"
    
bojanz’s picture

Status: Active » Fixed
Issue tags: -forms

Done! :)

  • bojanz committed fe9d8c9 on 8.x-1.x
    Issue #2689089 followup: Improve the interaction between #...
dww’s picture

bojanz’s picture

I have it working on multiple forms, Commerce and non-Commerce. We need to identify what makes that issue different.

dww’s picture

Good to know, thanks. I didn't want to re-open this issue, just add a link for interested parties.

dww’s picture

#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...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

joshi.rohit100’s picture

@bojanz this works fine on custom form except the validation part as constraint validation only works for entity not custom form