Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Issue on saving form when changing controls dinamically
maru
Hi,
I'm creating a form that contains a Listbox with a list of pages. The user is able to re-order this list of pages by Up and Down buttons which means that if i've got for example this list:
Page 1
Page 2
Page 3
the user is able to do this:
Page 3
Page 2
Page 1
In my element, I'm saving in value attribute the index of every element in the list, for example in the last list, Page 3 has got a value=0, Page 2 a value=1, etc
Also i've got replicants with a text element that saves the name of the page and another text element that saves the order (or position) of the page.
These elements are being updated according to list box, once the user changes the list order, value of replicants are being updated as well.
I'm using FormAPI for doing this, and everything seems to work fine, the issue comes when i'm saving the form, that it gets stuck in 'saving' status, i mean, i click on Finish and stays there, nothing else happens,it appears 'saving' message but the form never closes and obviously the form is not saved.
I'm working in TS 6.7.1 SP1 under Windows platform.
Could anybody help me with this issue? I'm attaching js.
Thank you!
Find more posts tagged with
Comments
Adam Stoller
If you're using Firefox, try using Firebug to help debug the code - otherwise stick a bunch of alerts throughout your FormAPI code (distinct alerts so you can tell which one's went off) and see if you can narrow down the source of the problem by determining where your alerts stop working.
Pawan
Is the attached file the complete js code, or any other js file is also used in the datacapture?
I see the function save_pages_order() in only called in moveUpList() and not in moveDownList(), so, i guess is there any required item(visible/hidden) left blank on save.
if you do not have any onsave event, try to create it and check the status on different events of save.
HTH
maru
I have verified all elements in datacapture and all of them are set to required="f", also i place an onSaveValid event that does everything and all my alerts are being displayed, the point is when i set IWDatacapture.save(); here's where it gets stuck.
When i creating a brand new form it works ok, i can save everything, it's just when i open it again and make some changes.
How can i know which error is throwing in IWDatacapture.save event?
Thak you.
i'm attaching new js file.
maru
I've seen that my issue comes when i'm doing 'something' to my replicant, when adding, deleting or modifying an instance is when i can't save the form.
Is this syntax correct?
count++;
pagesRep.addInstance(count);
IWDatacapture.getItem("/main/category/pages["+ count +"]/pageTitle").setValue(pageToAdd);
IWDatacapture.getItem("/main/category/pages["+ count +"]/pageOrder").setValue(count);
where count has the value of total pages in my List.
maru
I solved, i needed to convert to string the value of count due that it was getting the value as number, but setValue only accepts strings.