I work in Yii framework.
There is already done a form to edit person data.
Now we enter data for a contract about a pupil. Entering data about a pupil, we need among other to enter a list of his kins (parents and siblings).
The boss wants to add new items to <select> for a list of persons in the contract form without page reloading (in AJAX). That is he wants just to click "Add" button in the contract form and this button would open a form to enter data about a person (a kin of our pupil).
The question is how to implement it in a good (that is object oriented) way? There are already active forms to enter information about persons. What is the right way to "plug" a callback which updates the <select> in the contract form when we create a new person? Should this callback be called only if we open through the above mentioned "Add" button, or should it scan all open HTML windows and modify all "contract" pages (even if there is opened several contract pages)?
I make a shot to show up how it should work
Related
So here's the situation and I cannot figure out how to accomplish it.
I have a content type called "Alert". Each instance of this content type needs to have a webform (really just a submit button with hidden fields), that users click to acknowledge they have read and understand the alert. Ideally once submitted, the form should be replaced with a message along the lines of "You have marked this alert as read."
I do have a webform created (displaying as a block to be able to place within the variant page set up for the Alert type) and can get it to appear on each instance, but users can submit multiple times on each alert (submissions are set to unlimited as if i set it to 1 submission per user, the form does not render after the first submission on any alert). Additionally, once they click on one instance of the form, every additional instance will result in a message stating they have already submitted the form.
So I really have two issues. First, and most importanlty, allow a single submission per node (without the "already submitted" notice). Second, not required but would be nice, once it has been submitted for a specific node, the form no longer renders on that node for that particular user. Anyone have any ideas on the best way to accomplish these two aspects?
I'm running on Drupal 7.56, using the AT_Panels_Everywhere theme, Webform module Version: 7.x-4.15.
In drupal 7, with webform 7.x-4.0, you can enable webforms within a content type. To do so:
Go to Structure > Content Types
[Respective content type] > Edit
In the bottom left section, find the Webforms Tab and choose Enable webforms for this content type.
Based on your use case, I'd recommend enabling that and installing the node clone module. Then you can make one alert node, setup the webform, limited to one submission per user and allow content managers to clone content. That node can serve as a template.
I'm trying to catch email address as a variable with Google Tag Manager (GTM) on signup form submit on http://cloud.feedgee.com/ru/signup and fire a tag with it. On submit, the page is being reloaded.
By now tried to catch it with Form submission by form id set as shown on screenshot) and a Button click as a Custom event with it's click id
I initiated a DOM element variable with Id of the Form text field (Element Id=ContentPlace_loginEmail)
With these settings in Preview mode on Form Submit, I can not see my Tag in "Tags Fired On This Page" row before page reload.
What can be the reasons for this if Id's of the elements are correct?
May it depend on the container script location on the page?
Now It's located right after the HTML tag.
Can I store form text field in a DOM variable to use it in the tag?
If you want to store the email value in your own API, Google Tag Manager is not the right tool for you. You should only use it to track events that fit under Google's terms of use.
Having said that, when you're working with forms in GTM, hold the <shift> key with you click the submit button. If you do that, a new tab will open up, but the current page wont get redirected or refresh. You'll then be able to see what data is being pushed to the dataLayer.
I'm not sure if it's possible to do what I'm hoping, but maybe I'll get lucky. It has to do with setting form fields in a SharePoint 2010 list, using InfoPath forms.
Basically, I have one list with requests from several vendors. Each vendors has their own requests page which is a Web Part Page with one web part: a list of submissions with a custom view applied that filters it only to them. This is a (clunky but functional) way to ensure each vendor only sees their own requests. To submit a new request, they click on the "Add Item" link at the bottom of the list web part. At this point, a customized InfoPath form pops up, and they add their request.
In the form, one of the fields is "Vendor". What I would like to achieve is to have the InfoPath form read something on the page which tells it which vendor's page it was called from and pre-select that vendor (I could then disable the control so they couldn't change it). I am happy to alter the calling page as needed, or to configure the InfoPath form (can you custom-configure GET or POST values or anything to define a field that way?).
Any help would be very appreciated.
I have an access database which has one form, asset_information in the source of which some fields are restricted to values in another table ([brand name] and [model name]).
I am trying to write a 'popup' or 'modal' form for the asset information form which will allow users to open a search form for the model or brand, search existing ones and then either select the model or brand or create a new one.
Example:
An user clicks here on the first form,
After that, this form pops up - user searches and clicks in one of the results then clicks 'select model'
That returns the model_id selected by the user from the popup form to the original form.
Googling has not helped much, can anyone point me in the right direction? Should I be using the openargs on the second form, or the first and second form? Or should I be using something else entirely?
I just want to know if this is possible, let say I have form of a search bar that has a dropdown list that applies to the search with it on the front page and I have links on the side of recent search words which is outside of the form and I want to get the currently selected dropdown value from outside the form is this possible?
I'm using spring tool suite.
You could use javascript to copy the value from the drop-down into a hidden input field when the user presses submit. In jquery you'd do something like this: $('#mySubmitButton').click(copyFn);, where copyFn is implemented to do the copy and perform the submit afterwards (although you'll have to stop the form automatically submitting in the first place, this isn't difficult).
Alternatively, you could just widen the scope of the form to encompass the drop-down.