Constantforce in user interface.

In investigating constantforce I see this hasn’t been attempted too much in javascript.
So I am asking for an example of script, attachment to a component using code, and how the drag and drop in the user interface would be done.
This would be the answer to this question.

TIA.

http://www.cis.sojo-u.ac.jp/~izumi/Unity_Documentation_jp/Documentation/Manual/Physics.html