Forms

  1. I was wondering if I can define my own form through html tags and use the smartclient form api on it. I tried and it didn’t work. Maybe I was doing something wrong or you guys do not support it. For example, mydefineform.getValue(‘somename’)

  2. When I do something like this: <div>blahblah<script>dynamicform.create(…)</script></div>, the dynamicform somehow ended on the next line. I want it to be on the same line. I tried overriding the .textItem class but it doesn’t change anything. I tried setting position:“relative” too and it didn’t help. What do I need to configure for this to be on the same line?

Thanks so much.

You need to set position:“relative” as a JavaScript property in DynamicForm.create(). See the Basics->HTML->Inline Components example.

Hi, I already tried that as I have stated in my original message. Also, do you have a suggestion to number 1?

Ah, sorry. The most consistent approach would be to place the HTML side-by-side with the form by putting it in an HTMLFlow in an HLayout with the form. However, the CSS setting display:inline should accomplish inline display, with the possibility of some browser-inconsistencies (that is, don’t expect SmartClient’s pixel-perfect styling support).