Forums / Developer / Publishing a user profile draft / Comment38176
Paul Forsyth
Wednesday 25 June 2003 4:00:45 am
Got it working :)
In my edit.tpl I am explicitly using elements of the array $content_attributes so that i can display names slightly differently. This means at the end I have lines like:
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[0].id}" /> <input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[1].id}" /> <input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[2].id}" /><input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[3].id}" />
and so on.
My edit.tpl actually has two forms, intended to submit different parts of the data. The first form submits user account data such as login and password changes. The second submits shop data such as address changes. The user is the same, but i was being selective about what data was passed back to the form so for user data i used the appropriate $content_attribute element and omitted the rest.
Omission of the other $content_attribute causes the draft to not publish...
I guess this means i must submit all attributes to publish... Is this correct? A good error message would be nice :)
Time to refill that hip flask!
thanks
paul