Available Choices in Edit/New Form
I do this to get the array of (unselected) choices inside the new field: fd.field('SF_x0020_Lot_x0020_No').control()._el()[0]
.innerText.split('\n'); Two drawbacks: - Only works as long as nothing is actually selected. - Must be considered a hack
-Armin
.innerText.split('\n'); Two drawbacks: - Only works as long as nothing is actually selected. - Must be considered a hack
-Armin
Hello,
will get you all radio buttons in their correct order.
will give you how many buttons there are
will give you the second button
will give you the label of the second button
will give you the labels of all buttons in their correct order
will print you all the labels with their indicies.
Code: Select all
fd.field('choice').control()._el().find('td');
Code: Select all
fd.field('choice').control()._el().find('td').length
Code: Select all
fd.field('choice').control()._el().find('td').eq(1)
Code: Select all
fd.field('choice').control()._el().find('td').eq(1).find('label').text()
Code: Select all
fd.field('choice').control()._el().find('td').find('label')
Code: Select all
fd.field('choice').control()._el().find('td').find('label').each(function( index ) {
console.log( index + ": " + $( this ).text() );
});
Good morning Rostislav,
thank you for your detailed answer!
from http://spform.com/forms-designer- ... eld-values :
fd.field('ChoiceSingle').value('B');
does not work for me. Instead of 'B' i set the value like this:
fd.field('ChoiceSingle').value(ChoiceSingleChoices.indexOf('B'));
Maybe this is a documentation bug...
Best wishes,
Armin
thank you for your detailed answer!
from http://spform.com/forms-designer- ... eld-values :
fd.field('ChoiceSingle').value('B');
does not work for me. Instead of 'B' i set the value like this:
fd.field('ChoiceSingle').value(ChoiceSingleChoices.indexOf('B'));
Maybe this is a documentation bug...
Best wishes,
Armin
-
- Information
-
Who is online
Users browsing this forum: No registered users and 7 guests