How to make a text field required at run time when the user clicks the checkbox ?
I got a form where , there are several checkboxes and text fields associated with that checkboxes.If the use clicks on the check box then the associated
text fields should become required.I have tried the change event and the click event for the checkboxes.It gives error in the onChnage event and I got some weird results in the on click event .Sometimes if the user click the check box , then for the 1st time the field doesnt become required , then the user onclicks the check box and when the user clicks the checkbox for the second time the field becomes required,but if i deselects the highlighted field option and selects it again the field becomes required even if the user onchecks it I am totally confused !!! Adding to it i have also written the wrong code still i achieved the desired result ?? How it can be possible . I am writing the codes below , please help me as i am working under a deadline from the client.
onChange event :
var newVal = this.boundItem(xfa.event.newText);
if(newVal == 0)
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "disabled";
else
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "error";
For the onClick event :
var a = xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovere d_OnlyEnergyCharges").rawValue;
//app.alert(a);
if(a == 0)
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "error";
if(a == 1)
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "disabled";
Please help someone !!!
I used the onchange event and wrote the code for it. I got the result . But there is a problem.All these fields are in a table and it's a dynamic table where you can add rows dynamically at the run time .I have other change event for some fields in this table .All are working fine when i add the row.But for this check box the required fields are not validated as required at the run time . I am here giving the code , Please help me .
form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovered_OnlyEnergyCharge s::change - (JavaScript, client)
if(this.rawValue == "1")
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory= "error";
else
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandator = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory = "disabled";
Similar Messages
-
If a checkbox is selected how to make a text field required
Hi
I hoping someone out there can help me.
I am creating a form in adobe acrobat 9, I have a checkbox called 'other' and a text field named 'other_please_specify'. What I am hoping to do is when a user selects the 'other' checkbox the 'other_please_specify' text field becomes required. I will also need some sort of action that if a user deselects the 'other' checkbox then the 'other_please_specify' text field is no longer mandatory.
Can anyone help me figure this out?
Thanks in advanceIf by required you mean the required property of the field, the Mouse Up script of the check box can be something like:
(function () {
// Get a reference to the text field
var f = getField("other_please_specify");
// Set the required property depending on the check box state
if (event.target.value !== "Off") {
f.required = true;
} else {
f.required = false;
The "if" block can be simplified to:
// Set the required property depending on the check box state
f.required = event.target.value !== "Off"; -
How to make a text field exactly 3 chars wide?
I have an telephone area code item text field in a form which only can be input 3 digits. How can I make this text field exactly 3 chars or digits wide?
Appreciate!244805,
What browser are you using?
I just set up an item with Width & maxWidth of 3, and I cannot type more than 3 characters in it. I also changed Width to 1, and it still worked as I expected.
As I alluded to in my prior post, the size is approximate - it all depends on the font size used.
Thanks,
- Scott - -
How to make a text field smaller in size
Can I make a text field smaller in size (not just the length
but also the height) depending on the font size eg 10px. Whatever
font size I seem to use the text field stays the same size.Can you give an explicit example of what you want? Are you
referring to the
font size that someone sets in the browser, or the size you
set in the page?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"~Billy~" <[email protected]> wrote in
message
news:fa3oh4$67u$[email protected]..
> Can I make a text field smaller in size (not just the
length but also the
> height) depending on the font size eg 10px. Whatever
font size I seem to
> use the text field stays the same size. -
How to make a text field become empty when clicked in.
I have an input textbox, if the user clicks 'submit' and the
box is empty, it returns "please type answer here" in the input
box. Is there a way to make it so when the user clicks in the input
box it will turn back to blank and be ready to type instead of
having to select the existing text and delete it?
Thanks :)yep, use the onSetFocus method.
my_text_field_instance_name.onSetFocus = function() {
my_text_field_instance_name.text = "";
but be careful here, because if the user fills in there info,
then clicks off the text field then back on, the text will
disappear, you will need to use a combo with onKillFocus or an if
staement.... play with it. its real simple
corey -
How to make a text field wrap to next page
I've done my best to find the solution to my problem before coming here to post, so forgive me if I've missed a previously posted solution.
I am a .NET coder, using iText to manipulate PDF's. I need to create a template for a corporate invoice that will allow me to have header and footer content on a page, surrounding the invoice detail section and have the invoice detail wrap to the next page as necessary.
Criteria: All pages have the invoice header. All pages have the invoice footer with pagination (i.e. Page 1 of n). The number of pages is controlled by the number fo lines in the invoice detail text field.
For example, if the text field holds 30 lines and each line item takes up a single line. An invoice with 25 line items would only use one page. If the invoice has 35 line items, the content in the text area needs to flow to page 2 in the invoice detail area.
I have tried every combination I can dream up in Adobe LiveCycle Designer and I cannot get a document set up that will flow from page 1 to page 2.
For me to be able to access invoice detail field in code, it appears that it needs need to be a Text Field. I've been able to access the fields from my .NET code and fill them in without issue.
What I cannot get is a template that will allow me to put more content in the detail area than fits on page one and have it automatically create a second page and flow the content into the detail area.
Can anyone point me in the right direction, or provide a working sample PDF?
I.e.
PAGE 1:
MY COMPANY
ADDRESS
INVOICE #20
Line item #1
Lilne item #1 detail
Line item #2
Line item #2 detail <from here, detail must flow to the detail section of the next page>
Page 1 of 2
PAGE 2:
MY COMPANY
ADDRESS
INVOICE #20
Line item #3
Lilne item #3 detail
Line item #4
Line item #4 detail
Page 2 of 2While I appreciate the direction to the samples, that is not resolving my issue. I had already seen the samples before I posted in this forum.
None of the samples have what I've requested assistance with above.
I need a static 3" header, a 5" content area and a 1" footer on every page in a document. I want to be able to put content in the content area and have it wrap to subsequent pages if the content is more than will fit in the area. Each subsequent page must also have the 3" header, 5" content area and 1" footer.
This will not be edited in Acrobat, it will be edited in .NET code without human intervention, so having click buttons to add another row to a table is not an option.
I could create the entire PDF programmatically, but I'm seeking to find if Adobe LiveCycle Designer can make the PDF form in an easy to use GUI.
If the details of my need above do not provide a clear requirement, feel free to point that out. -
How to: Make Shipping Condition field required in Tx. VT01N
Hi everyone. I need to make the Shipping Condition field required in the transsaction VT01N Create Shipment.
I don't know how to do this, can somebody help me with this issue???
Thanks for your help!Hi Chemo,
As far i undestand, you want to calculate freigth cost using transportation.
To do this, you need to do some settings at that point to achieve that, please follow the link to configuration guide:
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LETRA/SDTRA.pdf
On functional side (after configuration), you´ll need to create the shippment cost document on VI01 transaction, there you can see all the cost associated to Shipping.
After that transfer it to MM using T-code VI02, its needed.
I Hope this help you,
Regards,
RP -
How to make a table field Required
Hi,
I tried to make a table field as 'Required'. It works fine. But it gives unexpected results. Imagine the table has 10 rows. when the user make an entry in the first row, the system gives the error messages for the required field in the remaining rows as well. How can we restrict it so that it checks for the required field only for the row with entries. How to specify the condition type?
Kind Regards
ShahulHi,
check this :
don't set table field as 'Required'.If your table data contains in a internal table , then use Below code under <b>PAI</b> event.
LOOP AT i_data.
CHAIN.
FIELD: i_data-fld1.
MODULE validate_field.
ENDCHAIN.
ENDLOOP.
MODULE validate_field INPUT.
write the code to validate the each line of the table control, if validation fails , cursor will stop at the table control row
ENDMODULE.
Regards
Appana -
How to make a window disable/enable in run time in webdynpro application
Hi all,
1) my requirement is in run time i want to make the content of a window in disable mode?
2) and again it should display in enable mode when we perform some action?
thanks & regards
naveen
Moderator Message: This has been covered numerous times in this forum. Also, the forum is not a free consulting service here to do your job for you.
Thread locked
Edited by: Neil Gardiner on Nov 22, 2010 9:27 PMHi,
You will not be able to do this with a standard radio button, as each one will be in a separate instance of the row.
The easiest way is to use a checkbox (as you can script this on/off) and then make it look like a radio button.
Example here:
https://acrobat.com/#d=sasUNmniOUgs3MwY-p4H8Q
Hope that helps,
Niall -
How to make iTunes automatically add music to my library when its downloaded from the web?
Before OS Yosemite, when I downloaded music off the web it would automatically be added to my iTunes library. Now they just ends up in my downloads folder but once I click on them, they start playing in my iTunes.
Hi Darg,
I don't have Safari installed here to look at, but I'd imagine it has a similar way to open certain kinds of downloaded files in specified applications.
In any case, the second method -- directing the download to your Automatically Add to iTunes folder -- is simple to do in any browser.
Let me know how it works out!
Ed -
How do I make my text field automatically upper case?
How do I make my text field in a form automatically upper case?
Use the following as the text field's custom Keystroke JavaScript (choose a Format type of Custom):
// Keystroke script for text field
event.change = event.change.toUpperCase(); -
Making a Text Field Required if User Checks box
Hi,
I am currently using Adobe Designer 7.0, and am trying to make a text field required if a user clicks on a check box above the text field.
I have the following code for the check box (on Change) but it doesn't appear to be working!! Any suggestions??
Thanks!
if (this.rawValue == 1 ){
TextField7.value = "User Entered - Required";
else {
TextField7.value = "User Entered - Optional";Hi Krisitan,
you are trying to change the value of the field instead of it's accessability.
Try this:
if (this.rawValue == 1 ){
TextField7.mandatory = "error";
else {
TextField7.mandatory = "disabled"; -
How to make more than one partition on Airport Time Capsule?
how to make more than one partition on Airport Time Capsule?
Only for the very brave......
Open up the Time Capsule (voids the warranty)
Pull the hard drive
Place the hard drive in a separate enclosure
Connect the enclosure directly to your Mac
Use Disk Utility to partition the hard drive
Reinstall the hard drive back in the Time Capsule
For the rest of us.....
The next best thing might be to set up one or more disk images on the Time Capsule, which will allow you reserve a given amount of space for each disk image.
Open up Macintosh HD > Applications > Utilities > Disk Utility
Click on the New Image tab
Navigate to the Time Capsule
Set up the disk image by naming it and specifying how much space you want to reserve -
How do I run a video in one cell of a table when a user clicks a button in another cell?
In other words, I want to put 3 buttons in one cell of a table so that the user can run one of three Flash videos in a cell beside the buttons. How do I do that?
Header 1
Header 2
button 1 runs video 1
button 2 runs video 2
button 3 runs video 3
video 1, 2, or 3 is inserted here when the user clicks the buttonYou will have better luck if you find a Flash Player that uses a playlist. Direct links to FLV files don't work.
http://www.wimpyplayer.com/
http://www.woosterwebdesign.com/flvplayer/
http://www.longtailvideo.com/players/jw-flv-player/
http://flowplayer.org/
Another option is to upload your videos to YouTube.com. You can customize a YouTube player and populate it with videos you specify. Then paste their player embed code into your web page.
http://code.google.com/apis/youtube/getting_started.html
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
How do I call a method when the user clicks on the delete button?
Hello , I need to implement the following :
If date from is less than sysdate , when the user clicks the "delete" button , he is shown an error message .
Can you please help how this can be done ? Thanks.Thanks. What are the steps for adding a custom delete button ?
Are these ok ?
1 ) Add an adf button
2) Add the following in the actions listener : #{bindings.Delete.execute}
3) Right Click button --> create method binding for action
4) Compare date ?
Thanks.
Maybe you are looking for
-
How to print on Avery labels with a laserjet 4730?
How do I print onto Avery labels (DL24) with a laserjet 4730mfp. I can't see where I specify the label name?
-
External Microphone in Windows 7 64bit
I have a MacBook Pro 15 MD104 with Mountain Lion. I'm also install Windows7 64bit Enterprise using Boot Camp. I'm download latest Sound Card driver with Boot Camp and install it (and all other devices driwer). Macbook has a one audio socket to combin
-
Is it possible to copy photos from iphone 4s to an external hard drive through a non-Apple computer?
-
Hello: I need to put the logo of my company in the email signature. Could you help me? I have an iphone 4 and an ipad 2 and I can not do in any of the 2 Thanks
-
Error when making connection: You have an error in your SQL syntax;
I'm getting this error when trying to make a simple Database Connection: SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '????????????????????????????