Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Okay this might sound simple but there's a catch. I'll try and explain the situation.
I have a page wich is build with a layout and in the center there's a view with 2 buttons and a normal form. The 2 buttons are to switch between two input forms. When the submit is pressed both forms are submitted. The first form is for general information and the second one is used to upload an image along with the information if so desired.
Now to avoid the question why not use one form? it's a request to keep the two seperated in this manner.
So i was considering going with 2 views where the top 2 buttons would act like a submit, creating a POST request with the form data but not actually submiting it to the database. And then redirecting towards the second view where you can upload images.
And then when the actual submit button is pressed i want all the data collected to be written into the database.
Basically it's like a page with 2 Tabs with a form each and only 1 submit button to submit the forms on both tabs.
I just can't get my head around how to create those 2 buttons to store the post data and then have the 'final' submit button use the previous post data and then other form data to create a new combined post data to store in the database.
Anyone have an idea how to accomplish this? Am i approaching this correctly or is there a simpler or cleaner method to doing this?
Thanks in advance!
You have a number of options here, one option is to create one form and add your two seperate sections as SubForms, i.e. instances of Zend_Form_SubForm. Then you can style the forms separately, tab them but keep one submit button for both. Also when you submit, the forms data will be separated into an array element for each of the sub forms.
you can see more about this here:
http://framework.zend.com/manual/en/zend.form.advanced.html#zend.form.advanced.multiPage
another solution i'm fond of is using an action helper to split the process of adding the forms into two pages, similarly to the url above but storing form information inside a session object until both have been validated and then processing both forms at once.
http://framework.zend.com/wiki/display/ZFPROP/Zend_Controller_Action_Helper_Multiform+Proposal+-+Simon+Mundy
http://framework.zend.com/wiki/pages/viewpage.action?pageId=42130
hope this helps.
Related
I have a data module where I added a KeyHookProc. This data module is created before all forms and the hook should catch the name of the form that is on top of the application.
I've tried both Screen.ActiveForm and Screen.FocusedForm but both points to the applications Main-form.
The main form is of course not closed but I wouldn't say it's active or focused. The active/focused should be the form that I opened last teh one that I currently working in.
But, apparently not.
Is there another way to find the form that is on top?
So I have a data base with 8 or 9 forms. Each form has the same 10-15 controls on the top. I'm wondering how I can 'include' these controls, without having to do it on each form. The problem is that anytime these 10-15 controls change, I have to change it 8-9 times, one for each form. I know how to do this using php, e.g. "", and that allows me to only have to edit one file.... but how do I do it with access?
Thanks!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Is there some best approach to create one page website in TYPO3 ?
My idea is to create navigation in TypoScript and FCEs for every segments so I can link it.
Any ideas?
I have created a one page template as an extension for TYPO3, this can be downloaded from GitHub.
http://github.com/maximilian-mayer/t3onepage
Yeah it's a nice approach.
You can too use javascript to generate the menu based on the number of FCE you find in the content.
The two approach are nice.
I had to mind on this problem for my work.
You can manage all contents by their content id. First add one header and then add one FCE for that header part. Header becomes your menu. Note that you use separate grid for all section(one header and one FCE).
Create a subpart menu for a one page template in typo3
check this link for menu in one page site.
I would solve it either in pure TS or in fluid.
TS-solution:
for navigation use a HMENU as usual, but modify the links to be anchor-links
for the content use another HMENU but instead of the links generate the whole content from that page, for example with a CONTENT object (using the uid from the current (menu)-page as pid for selection). dont forget to insert the anchor.
fluid-solution:
do the same, but instead of TS use the according VHs from ext:vhs: v:page.menu, v:render.record
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am not going to pretend to know anything about creating forms in Access, it is an entirely new concept to me. I have a DB in access that contains a number of tables and queries. I would like to create an access form that I can use as a search form, to look up any particular fields i need. I would simply type in what I was looking for and a list of the tables/queries that relate to it would appear. Is this doable?
The short answer to your question "is this doable" is: yes this is absolutely doable.
A good place to start would be to use the Form Wizard. Then get some training (plenty online) on how to design forms. Dlookup will likely be your friend.
Alternatively, a Report is another way to show a specific record based on some specified criteria (show me address for person A).
Short answer: Yes.
Longer Answer: I dont know what your background is. If this is your first Database project then you have a lot of reading to do and I would go and get myself a good ACCESS book and read it or spend a lot of time on the Microsoft Technet. Thats about as specific as I can get from the question itself.
Perhaps a solution for you:
Step A: Create a form
There are many ways to create forms. You may try this one:
1) In the Access Objects Window (far left on your screen) mark the table or query you want your form be based on. That means: the form shall display all the fields that are in that specific table or query.
2) With your table or query marked, in the "Create" pane of the Ribbon, click the button "Form". This creates a rudimentary form with all the fields from your table or query arranged in a more or less sensible way. (If you do not like the way the fields are arranged, you can re-arrange them, resize them or remove some of them, etc.)
3) Close this form. On closing, you will be asked to enter a name for it so that you can identify it later.
Step B: Use the form for filtering
1) Open that form (now in "form" view, not "design" view, of course)
2) In Home section of the Ribbon, in the Sort&Filter Area, click on the tiny button "Advanced", and from the dropdown select "Filter by form". Having this done, you then can enter various criteria in the fields on your form. Some of them may display dropdowns to choose from existing content. In some fields you may want to enter stuff like
Like "*liv*"
which will search for content containing any of live, lively, oblivious, olive, etc.
3) To apply the filtering, in the Ribbon, Home Section, Sort&Filter Area, click "Toggle filter". This will make your form display only records that comply with your criteria.
4) To wipe out your filter criteria, use the button Advanced --> Clear all filters.
This was a very basic introduction into core functionality of Access. Generally, I would support the other contributors here in saying: go to your local library and take any of the various Access introductory books they have there, read it, and try out what you read. You will make quick progress. (You may as well read any tutorial in the internet, but I personally would recommend a book: you just will have the fun to stroll through the pages, perhaps sitting in your garden, and bump into interesting stuff you probably would not have expected. That will help your progress considerably.)
Basically, what pros/cons are there to using multiple forms in the same web page vs one form with multiple submit buttons? Any difference at?
Ah? Multiple submit buttons on a single form will all submit the entire form when pressed... there's really no advantage to having multiples, unless you're overriding how the submit process works so each button only submits it's own area. In this case they'd probably not even by submit buttons, but just buttons with sum JS code to handle submission.
Multiple forms are discrete spaces of data collection, each can have it's own submit button... but only one of them can be sent at a time (and depending on the browser you may loose what's in the other forms).
Neither approach is particularly good from a user interface perspective since it'll be confusing.
The real question is, what are you trying to do that prompts you to ask this?
The two behave differently and there are good reasons to choose one over the other.
Multiple Forms on a page allow you to send data to two different locations. A common example is to have an input form as the main focus of a page going to one location, and a search form that appears as part of the generic header/footer. These both go to separate locations and submit only the HTML form elements within their appropriate <form/>
Multiple submit buttons offer you the ability to give different purpose to a submitted set of form elements. E.g. One form may have a bunch of submit buttons all with name attributes, meaning you can add conditional logic on the server side to say: "Continue", go " Back" or even "Save for later". All reference only the form elements within it's parent tag.
Two side notes are: 1) You can't nest forms. 2) JavaScript can change this default behaviour if you wanted it to. :)
Edit: with reference to a comment you made, if you wanted to do without JavaScript (a wise choice while it's not needed), you could do some careful thinking and keep POSTing the form to itself. Each time checking which form button has been clicked (top tip, give them all the same name and you can just switch case through it) and do whatever you need to do, including performing validation. E.g: When they hit "add media", you'd save the media uploaded and return a reference of it to the screen as a hidden input. The user can then continue to add things to the other boxes and when complete, hit your save button, at which point you do all the main saving work and make sure you tie the uploaded file to it as well.
You effectively keep adding stuff to their screen until they hit the save and then you perform a save method and redirect to a thank you page (or whatever logic suits your scenario). :)
All fields in a form are sent when one of their submit button is clicked. It's for you to see if you need all fields or not.