I’m asking for a address twice on a form – billing and delivery. Address is modelled as an object.
How can I compare whether the values of both modelforms are the same – if they are, i’ll use the same foreign key from my customer object in both cases.
You can compare the
cleaned_dataof both forms.From a usability perspective, it’s better not to make the customer enter the same address details twice — give them a tick box e.g. “Use delivery address as billing address?”.