XF 2.2 How to hide form rows from the account_details template?

Orit

Active member
Hi
We have a bunch of custom fields we'd like to have the users fill out on a separate page (in addition to them being on the account details page).

I've created a page, copied the "account_details" form,
and tried 'commenting out' (before deleting...) the fields I'm not interested in displaying
(I was able to hide the unwanted custom fields by using their data-attribute in css. The fields I need help with are the default xf fields).

The problem is when the form is submitted it gets sent as though the commented-out fields are empty and therefore deletes their content or settings...

Is there a way to hide them using "display:none;" as I did with the custom fields?
This way they would still be included in the form just won't be displayed.

I'm talking about the xf:textboxrow and xf:editorrow, the dob helper etc...

Thanks!
 
I just found this hack:


@cmpe suggested adding a row-type to the xf element like this: rowtype="nameOfClass", which basically adds another class to the formRow which looks like:
formRow--nameOfClass

I can now use plain css to hide the unwanted rows.

Mission accomplished :)
 
Back
Top Bottom