Concurrently filling in drupal forms on different computers mixes up form_state data of the different computers - forms

I'm having a very difficult problem atm, one that I can not explain... at all. I really hope someone here may be able to shed some light on this predicament.
On my website I have a self-developed module that displays some kind of registration form. The registration form consists of different parts:
Personal information
Educational Information
Linguistic Skills
Local/Exchange Specific information
Some optional additional remarks.
Using AHAH and the AHAH Helper module I have created (read: programmed) this form to be 'multipage'. It has the header on top describing what part of the total registration you are currently in, and which parts you have yet to complete. You have a previous/next button to navigate between the different pages of the form.
This is all controlled by AHAH, and I keep track of the pages using a hidden form element with a default value 'current_page'. Anyway that is kind of besides the point.
The important part of the above explanation is that the data of all the different parts persists through the different pages by using the form_state variable. AHAH Helper keeps the previous values entered in the form saved in the 'storage' of the form_state.
Now some of the users seem to be experiencing the following problem upon registering:
While they are filling in their information, and some AHAH call is triggered in the form (e.g.: Pressing the next button, Checking the email address for validity, checking birthdate for >= 17) after the AHAH call is finished, the values within the form elements, that had already been filled in, have been replaced by completely different values.
A name of a different person, his age, his email address etc. Even though this person, I assume that this is what is happening, is filling out the form on a different, private computer, in obviously a different session.
My users do not have to login on the website in order to register using this page, I'm not sure if that is causing an issue?
Anyway, as far as I can tell, I can only recreate the problem when I try filling out the form with different data from different browsers on my computer, concurrently. In that case I can manage to corrupt the form_state data. But as the users are on different, private computers, which presumable use different sessions/cookies/what-not, how is it ever possible for form_state data to be changed to form_state data of another computer who is also filling out the form??
I don't get this? Is there some kind of inherent flaw in using AHAH (& AHAH Helper) for keeping the form_state? If there is, is there some kind of work around? Am I just making a huge newby mistake somewhere in my module code that prevents the form from working correctly?
Is there please, anybody, that can shed even a little bit of light at all on this problem? I am absolutely, and completely clue-less and I can not begin to imagine what is going wrong and how and even IF I can fix it at all.
Please help me! :S
Thanks in advance!
Best Regards,
Tom
Edit:
This problem describes a problem in drupal 6.x

I'm answering my own question after having found the solution (quite a while back, but I forgot about this question).
The problem is that the form_state for the different computers is kept apart using session information from drupal.
However, this did not seem to work correctly with the AHAH forms for users that were not registered.
Having users register before being able to fill in these forms solved all the concurrency issues.

Related

Inserting data in oracle apex (through a form into a table?)

When programming i usually do everything myself and recycle code when needed so for once i decided to try out a development platform to speed up the process so i picked oracle apex- only to find myself suffering with overchoice
Normally if wanted the user to give me some data id just make a form and the data just ends up on my database, not hard.
this isnt what i want to make, this is just for the sake of an example of the way one usually goes about this
another example
But now in oracle apex i dont even know if this is even the right way of asking end user to input data into a table, what should i do if -for example- i just want to make the user run some calculations and then store the results? Is there something specific that apex already has for this or do i do it myself normally
Any tutorials or the names of the functions i need to use would be helpful
I think maybe what you might want is Report with Form.
Its a setup the Page Wizard can make for you which is essentially exactly what you want. You select the table and columns, then it makes one page with a table of all entries, and you can click on an entry or click to make a new entry, and it opens up a form with the relevant page items which you input or edit, and then save.
Maybe a general APEX guide would be best for you since you are so new to it. Because if you know what is possible, then you might find different solutions to problems you have. I dont have a guide to recommend unfortunatelly, but I am sure you can find plenty on google, just make sure the version is correct, it doesent have to be for your exact version(there is a big difference pre 18 and post 18, less so with 19 and 20)
Yes, APEX can be a bit overwhelming in the beginning. Your question is very generic so it is hard to give you a detailed answer. In general, if you have the data in a single record, then a form is the way to go (easiest is to start with report and from). If you need to modify certain column data after user submit, you can do that in processes or computations before submit.
Feel free to ask a question with your specific business requirement - you're pretty sure to get an answer here.

UX and Security - The best way to display the ID of object to user

If you have an experience in UX or Security, please answer this question.
I am working in some project and we need to show the object id to the user.
So all edit form's has the id, the client ask for this --".
My doubt is, what is the best way to show the id in the form?
I did this way, the ID is just a text:
But some one is showing the ID as a disable input, but this seems wrong to me.
Can some tell me the best way to show the ID ? Maybe a third option.
And please explain your answer, I need to convince my team.
Thank's!!!!
An Information Architect here.
I think your first inclination: putting the ID in the visible field as text, is correct - provided the text is selectable.
Do not put text that can't be edited into what looks like an editable field, even if it looks disabled. You're telling the user "you can do SOMETHING to edit this number, but you're not doing it now, and I'm not telling you what you have to do, nor why you'd want to do it, nor what happens if you do". That'd be a really poor approach.
One other thing to think about: does it need to be the first thing in the form? Sure, the ID is probably the first field in the database, but it's probably not of first importance to the user. Order it so it makes sense to her.
Information in the page has a hierarchy, and the top and left of that hierarchy (in languages which read left-to-right) is where the most important thing the user needs to see should live.
(That doesn't mean you can't have a header with a top-left logo or top navigation on the page - of course you can. People understand what that stuff is - we're talking about the top-left of the content area).
If you need more background on information hierarchy, I suggest you search for information on "F-pattern reading" for a quick visual example of how people consume information in the page. The Poynter institute did, I think, the original research on this with an eye-tracking study.
You only show object id and name in the page. If that's all that's there, the page's simplicity means you don't need to think it much further through.
If there's more, you'll need to order the information in a way that's important to your user, and that's natural for completion (for example, an Address has many common components, and completion should occur in the order a user would write the address in the context of the local language).
To understand how well you've done with the page's usability, take your best shot, mock it up, then show it to a few (non-technical, non-project-manager) people. Hand them a pencil, and say "use the pencil as your mouse. Point and click on things to do [name of your task]. Don't tell people how to do it. Just ask them to point at things on a printout. This is called a paper prototype, and can be an inexpensive way to learn a lot about your design. Try this with maybe 5 people before you refine and start to code it up.
I'm not sure what the "Security" aspect is (is it a security product, or an IDM component?). If the question is "Can I show the user the object ID?", you'll have to answer that in the context of your internal security model. You'll need to estimate what you're protecting when the object ID is not shown, what's at risk when it is.
Ideally, your system would prevent a malicious user who knows the object ID from doing anything with the known information, and from harvesting object IDs in bulk.
Of course the correct solution is not to show the ID of an object. IDs (along with object) are internal technical terminology, the user does not care that you use an id to uniquely refer to an object in a database.
Just remove the ID field entirely.

magento custom order form

Thank you in advance for reading this. Here is the situation. I have been working on a online guitar shop using Magento CE 1.7 for several months. I greatly underestimated the cost of the site and I know that is my fault not the client who by the way is a great guy. There where many issues that took a lot of time including having to move it from a testing server to the real domain, many logo tweaks etc. I am almost done with it and really need to “stop the bleeding” so to speak however there is one feature that he really wants that I am at my whits end with.
Its a custom order form for guitar pickups. He had one on his old site that was don’t in ASP and besides not knowing ASP we are now on a Unix server.
His requirements are “the ability for someone to choose a category (ie: 7-string, Strat Replacement, Tele Replacement, etc) , and then have it be able to only show options that are applicable to what that selection. I want customers to be able to see descriptions of each pickup somewhere on this page. I also want people to be able to see what the covers/colors look like when they choose that.”
I was able to use the way back machine to at least show you guys what he wants, here is the link http://web-beta.archive.org/web/20120127233223/http://www.axepalace.com/pickup_order.asp
Here is my attempt to create it with a product with lots of options. http://axepalace.com/pickups/bare-knuckle/bkp-order-form/bare-knuckle-pickup-order-form.html
So could anyone please give me some feedback / suggestions. My sanity would really appreciate it!

UIPickerView and a Giant Contact List?

I'm new to iOS Development and am trying to make an application that essentially sorts through a list of 300 names or so. I've got the Drill-Down part of the application down, aside from the detailView, but am now faced with a challenge.
What I would like to do is have users select from 3 fields with a UIPickerView to come up with shorter lists for every time a user is looking for a person. I'd like to use a .plist, but I also have an XML feed of the information. Before I waste all of my time structuring these data sources, does anybody have a good overview as to how I should approach this?
Also, I've asked some this question before, and they tell me to read up on introductory iOS development topics. I understand the mechanics of development, I just can't ever figure out how to approach a task properly. (I'm working on it!)
Thanks in advance. I'd share an image to help clarify, but my rep isn't high enough.
Snip: It looks like I misread your intention which makes my earlier comments irrelevant, you want to have the user select one of 3 options to shrink the list, if I'm not mistaken.
Some more questions for you, so I take it that this XML feed is going to be potentially changing between times that the user loads up the app? Will it only ever grow or are those 300 or so names that are loaded once set for good? The reason I ask so that you can maybe see my train of thought is whether or not using Core Data might be useful. You could easily store your large list locally, save time having to reload this large list frequently, and also you can use the built fetchedObjectController to search your collection of names. I'll keep thinking about it and once you get a chance to answer these questions we can continue.
Ill check back for an edit or comment, and see if I can give you an approach. Also, maybe edit your question with any of your own approach ideas and we could also start from there and refine them if needed.
Edit 2: From the information in the comments this is one of the ways that I could see this being done that make sense to me:
Since you seem to be able to control the information you receive from the feed I would set it up to send you only the contacts that need to be added/removed. You could handle this a few ways depending on your deployment intentions but I would go with the following:
Find a way to signal a first time run of the application, and as a result all contacts would be new, and you could populate your list fully with a slightly longer first time setup. Then any further changes could be quickly handled by smaller edits made to the local list.
You would need to set up Core Data for your application, which should be fairly straightforward in your case, and after this you can use the built in NSFetchRequest to do your searches that will then quickly return a list of narrowed down contacts. As for the physical picker that is just a matter of building the UI which will require some design from your end as you are the only one that knows what you are going for in that regard. Depending on the complexity of your app and what functionality you will want to include you could get away with 1-2 views that simply do the displaying of the contacts in a table and then the picker just reloads when appropriate.
I'm not familiar with the implementation of XML Feeds and receiving data from them, but I have done XML Response parsing into Core Data from a SOAP service before and they shouldn't be terribly different.
Regarding resource to get you started should you need them, I would recommend the following:
eBooks:
http://www.techotopia.com/index.php/Objective-C_2.0_Essentials
http://www.techotopia.com/index.php/IPhone_iOS_4_Development_Essentials_Xcode_4_Edition
Tutorials:
http://www.raywenderlich.com/
The eBooks I have linked are both absolutely fantastic and one of the few xCode 4.0 books that I was able to find that seemed to be of an actual usable quality. They both contain easy to follow and clear tutorials on simple and more advanced aspects of programming for iOS.
Ray's site is an immensely helpful resource as it contains both a very active forum base for iOS programming in addition to a constantly growing tutorial collection as there are 4-5 people that constantly are creating new tutorials that the community votes on and suggests every week. It contains some more advanced topics than the above books and I would recommend looking at it after doing a few walk through/tutorials from the books.
I'll stick around if you have any further questions, otherwise you can send me a notification via these comments, or just post another question and someone is bound to help you out!
-Karoly

Simple form validation

I have a site with a simple contact form using ASP for customers to e-mail quote requests. However, I'm getting quite a few messages through with no contact information; I think people assume that their e-mail address is coming through automatically.
I'd like a simple way to make the e-mail and/or telephone number fields required, preferably so that the fields are highlighted as such if they're submitted without anything in them. I've Googled for this but they seem either too simple, diverting people to a separate page and requiring a 'back click', or incredibly complicated with massive reams of code.
Any suggestions?
EDITED
You should use a combination of server-side validation as well as client-side (JavaScript) to ensure there are no security holes in your form.
For any specific coding examples, please direct the question to Stack Overflow.
You can use "ASP form generators" that generate both server side and client side scripts.