Hi !,

Would be awesome to be able to avoid dragging rows and hiding the link of row weight when the field is being edited. Is it possible to do?

Thanks,
Javier

Comments

stborchert’s picture

Status: Active » Closed (works as designed)

This is the default behavior of multiple fields of Drupal core so Simple Hierarchical Select is not intended to change this.
You can simply hide the link and the drag handles with CSS (use Firebug for Firefox to see which elements to hide) or override theme_field_multiple_value_form() in the template.php of your theme to change the markup.

javier.drupal.2012’s picture

Thanks for this.

I have changed my css to solve the issue. I write the solution I have made just in case can helps anyone.

Hiding the show weight rows link:

#field-zona-donde-buscas-trabajo-add-more-wrapper .tabledrag-toggle-weight-wrapper {
	display:none;
}

where field-zona-donde-buscas-trabajo-add-more-wrapper is the name of the field with the shs

Hiding the draggable feature:

#field-zona-donde-buscas-trabajo-add-more-wrapper .field-multiple-drag {
	display: none;
}

where field-zona-donde-buscas-trabajo-add-more-wrapper is the name of the field with the shs

Hope it helps