Populate Text Field from Drop-Down in LiveCycle by Adding to the Value - livecycle

I am populating a text field from a drop-down menu in LiveCycle and have the basics in place (thanks to previous posts). I would like a second text field to populate the second selection from the drop-down menu but I am having difficulty.
Drop-Down Menu = January (Value is 1 or first choice), February (2), March, etc.
When a user selects "January" (the first choice from the drop-down) I would like the text field to populate "February" or the second choice from the drop-down. It currently displays the user selection:
this.rawValue = xfa.event.newText;
I am not sure how to add to the raw.Value to display the 2nd or 3rd choice from the drop-down. Thanks in advance!

DropDownList1.selectedIndex will give you the dropdown selected index.
The following javascript may help you,
DropDownList1.selectedIndex= DropDownList1.selectedIndex+1
TextField1.rawValue = DropDownList1.rawValue;
Hope this is helpful.

Related

ms-access only show records when selecting certain item from dropdown

I use MS-Access 2013 for this project.
Something I'm unable to find is how I can hide and show certain fields when something happens.
Let's be a little less vague. So, I have a dropdown of 5 items. Oral Exam, Written Exam, Exam on PC, External exam and revision.
All fields are the same for almost every possible selection in the dropdown apart from "exam on PC". Then some additional fields should be filled in, in the form. These are PC_Number amongst other things. The fields are "Yes/No" fields and simple input fields.
Is there a possibility to hide them when "exam on PC" isn't selected in the dropdown and show them when "exam on PC" is selected?
Yes it's very possible and very straightforward.
Lets say your drop down field is Field1 and the field you want to hide or not is Field2
Simply add the following code to the AfterUpdate event
If me.Field1.value<>"Exam on PC" then
me.Field2.visible=false
else
me.Field2.Visible=true
end if

how to insert a checkbox in a word document

I want to make a list with checkbox on the left in the Word document. I don't want to use VBA macro every time.
example:
[] item1
[] item2
*[] is checkbox
Click the Developer tab and in the Controls group, click the Check Box Content Control, and then click to the right of the box.
-
This is the original link. There is too much redundant info.
office Support

How to display suggestions in a textbox while searching?

Can anybody has working code example using CN1 for a search text box, which displays suggestions dynamically while user types text into it. Please help.
AutoCompleteTextView: An editable text view that shows completion suggestions automatically while the user is typing. The list of suggestions is displayed in a drop down menu from which the user can choose an item to replace the content of the edit box with.
The drop down can be dismissed at any time by pressing the back key or, if no item is selected in the drop down, by pressing the enter/dpad center key.
The list of suggestions is obtained from a data adapter and appears only after a given number of characters defined in list.
For more detail explanation check AutomCompleteTextView Example
Hope this will help you.

Styling views in Drupal 7

I developed a content type of "sale car". Now I'm developing its view to display a brief list of Car Ads with some basic fields (car, model, color, price, link to full ad) inline of each other like this:
BMW, 120 d $X,xxx,xxx.xx
Royal Blue, Automatic, View Ad
I'm wondering how can I achieve this style? What style format I should use: Table, Grid or something else? Or do I need to get it done through coding?
You want to create a view that is a list of fields.
Once you've got this, add the relevant fields into the view and you should be done.
Choose the relevant format from the format link, check the preview and you should have your view.
To create the view structure:
Node 1 Node 2
Field 1 Field 2 Field 1 Field 2
Field 3 Field 4 Field 3 Field 4
Add all four fields to the view. On each one select "exclude from view". At the bottom of the field list, add a new "custom text" field.
Do exclude this one from the view though, that's important.
Go into the custom field and in the textarea you can enter HTML code and use the replacement patterns to output the field.
For example:
<h2>[title]</h2>
<ul>
<li>[field_one_name]</li>
<li>[field_two_name]</li>
</ul>
<ul>
<li>[field_three_name]</li>
<li>[field_four_name]</li>
</ul>
Get the name's from the Replacement Patterns box under the textarea.
Then select whatever format you think is right. I think you're after a grid.
Drupal provides a way to style the view.
Go to your view.
Click on 'Advanced' link at right side.
Click on link after the label 'Theme'.
You will get the list of templates used to style the view.
Create your own template with one of the given name in the list for
specific fields. e.g. views-view--VIEWNAME.tpl.php
You will get the view of your own style.
This is how the Drupal views styling works. :)
Styling views in Drupal 7:
Add field(which to display) and check the option "Exclude from display".
Now go to "Rewrite Results" and check the option "Rewrite the output of this field"
and below there is a section called "Replacement patterns" where all the added
fields appear as a variable(saying variable just for easy understanding)
Like :
[title] == Content:
Title[field_event_date] == Content:
Event Date[body] == Content:
Body[body-value] == Raw value
Above there is a text ares called "Text" where you can customise your style
for this field(Not good practice follow step 4 for better)and clicl "Apply All".
Now add one more field(this is an extra field) called "Global: Custom text"
DO NOT check "Exclude from display" and below text area called "TEXT"is
the area where we will be writing our HTML codes for styling the views
using all the fields which are avalable as token here under the option
"Replacement patterns".
Click on the "Apply All", And YES its done.So simple and cool na??

Dynamically populate dropdown list from database based on selection in other dropdown lists using dojo

I just want to know how to design the UI with Dojo
I want to populate the dropdowns based on other dropdown selections,and the relationship can be one-to-many, i.e the 2nd dropdown will be populated based on the first one, but then, the 3rd dropdown would be poupulated based on the 1st and the 2nd one and so on.
my requirement is that whenever i select an option in a dropdown, it should be sent to a servlet(running on a given URL) with the selected choice (and any selections made previous to that), so that the servlet could return the data with which to populate the next dropdown
specific Questions
how do i write the code for dropdown form elements (using dojo)
how do i send the data back from the servlet to the webpage so that it will be read by dojo populated in the dropdown
See http://dojotoolkit.org/reference-guide/1.7/dijit/form/FilteringSelect.html#codependent-filteringselect-combobox-widgets

Resources