Remove some profile fields
-
This topic had been closed, but I have new information to contribute.
One issue is that the “website” field can’t be removed.
You may have to use jQuery to hide it.
Here is an example:
// hide things we don't want:
$(".form-table:first").hide();
$(".form-table:last tr:first").hide();
$("h3:first").hide();
// hide them using the eq pseudoselector, which starts counting at 0 rather than 1
$(".form-table:eq(1) tr:eq(4)").hide();
$(".form-table:eq(1) tr:eq(5)").hide();
$(".form-table:eq(2) tr:eq(1)").hide();
This hides the fields here and there– I’m basically hiding the first table, the first row of the last table, and the first H3 tag. Then using the EQ pseudoselector, various other fields rows are hidden, one of which is the website field. Of course this will break at some point if the User Info tables are changed, but nothing in the world is guaranteed. (It sure would be nice if the inputs all had labels in this layout.)I also used another hack to add some additional input fields, “comments” and “internal_comments” — but they showed up as regular text inputs. So below is some jquery to change them into textareas, which are more useful. Apparently, though, the returns in the textareas are turned into spaces.
var commentsbox = $("#organization");
commentsbox.replaceWith('<textarea id="'+commentsbox.attr('name')+'" name="'+commentsbox.attr('name')+'">' + commentsbox.attr('value')+ '</textarea>');
var commentsbox = $("#comments");
commentsbox.replaceWith('<textarea id="'+commentsbox.attr('name')+'" name="'+commentsbox.attr('name')+'">' + commentsbox.attr('value')+ '</textarea>');
var commentsbox = $("#internal_comments");
commentsbox.replaceWith('<textarea id="'+commentsbox.attr('name')+'" name="'+commentsbox.attr('name')+'">' + commentsbox.attr('value')+ '</textarea>');
- The topic ‘Remove some profile fields’ is closed to new replies.