This topic is locked

Required filed (*)

10/23/2011 9:47:19 AM
PHPRunner General questions
N
notuo author

Hi.
Regarding the required fields, for example, If I have a multiple vertical checkbox, the required symbol (Red ) appears at the bottom of the list. This is not really a good visual indication IMHO.
Is there a way those red
to be at the end of the label or at the beginning of the label?
Thanks in advance

Sergey Kornilov admin 10/23/2011

Unfortunately there is no workaround for this.

N
notuo author 10/23/2011



Unfortunately there is no workaround for this.


Any directions for style the label instead? Maybe with :after Pseudo-element.

C
cgphp 10/23/2011

You can remove the Required field flag for that field and in the Javascript OnLoad event of the Add/Edit page, enter the following code:

var ctrlFieldName = Runner.getControl(pageid, 'FieldName');

ctrlFieldName.addValidation('IsRequired');


Then, you can add the required symbol (Red *) manually and place it where you want.

N
notuo author 10/24/2011

Thanks Cristian. The "bad part" is the manually you mentioned.
I'll ask a a suggestion for a future release.

C
cgphp 10/24/2011

In the Javascript on load event of the add/edit page:

var required_span = $('<span>&nbsp;* Required</span>');

required_span.css('color','red');

$("input[type='checkbox']").eq(0).next().after(required_span);