How to display drupal custom form if user clicks adwords advertisments? - forms

My client want to published some adwords advertisement on Google. The website only purpose is presenting info about it's company and it's not an e-commerce site. Since adwords final result depend on conversion we decided to add simple form including following fields.
1) Name:
2) Email Address:
3) Occupation:
However, we need to display this form if only a person clicks on the 10% discount adword advertisement via Search or Display network. We think by user submitting this form user may contact us is definite.
My Questions are:
1) Is there a way to display this discount form only if user click the Google add? if so could you pls clarify
2) Is there a module for Drupal 7 to create custom form fields?
3) Otherwise is there a different method to achieve what I explained above?

The Referer HTTP header field might tell you the URL of the page from which the user might have come to your site.
The first might means, there is no quarantee that it is present.
The second might means, if it is present, there is no quarantee that it is accurate.
The Fields module can be used to create custom form fields. It is part of the Drupal 7 core. It can be used to attach fields to bundles. A bundle is a set of entities. EXamples are
The nodes of a node type are a bundle
All users are a bundle
The terms of a vocabulary are a bundle
The Fields module provides an API to define new entity types and groups them into bundles.

1 - You can create a unique Webform and exclude it from search engines in your robots.txt file. This will allow it to be accessed directly via the URL, but it won't be picked up by any search engine, and therefor can't be found by anonymous users. You'll have to add it in the robots file as such:
User-agent: *Disallow: /your-page-path/
You may also have to exclude it from your site's search (if you have it).
2 - If you haven't already tried the Webform module, it's a great module for creating custom forms and gathering submissions right within the Drupal site.

Related

Can I read a value from one SharePoint web part into the the form for a list in another web part?

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.

Sitecore Set base templates excluding a Field

Is there a way in sitecore where , when you are setting a base template you can exclude a certain field ?
For eg: i have a base template with 4 fields
Name,Id, Salary, Phone number , Facebook Id, Twitter Id, LinkedID
If i have 3 Item Templates FB, Twitter, Lin which has the same Base template -
I would like not to inherit only certain fields - ie, for FB Item I would like to inherit everything except Linkedin and Twitter . And for twitter - everything except FB and Lin.
Please note: this is just an example scenario. This is the best example i could think of. I would like to know if this is feasible with sitecore.
I understand that the ideal option would be to separate out the user info template from social info. But that is just for this scenario.
No. You cannot do this in Sitecore.
Sitecore template inheritance does not allow excluding certain fields from inheriting in child templates.
You may consider creating another "base base template" containing only what's needed in all inheriting templates.

Split Sonata User Bundle registration form into stages

I'm currently working on a user registration form for a site I'm working on. The site requires a lot of information about users up front, and I'd like to break it down into stages.
The first stage requires the user to put in an identifier in the form of an order number. I would then check the order number exists in the system before making them continue to fill in the rest of the fields. I'm not sure how to go about doing this.
What I've managed so far though is to override the underlying User, RegistrationController and RegistrationFormType and render out a customised view with the relevant form fields.
An overview of the process I'd like would be:
FORM: ask for order number
process form and check order number exists (if not go back to 1)
FORM: ask for user information
process user information and store
complete
Simplest way of doing it will be to override registration template, and hide all fields except those you wanna show in first.
And than add some js validation rules, - to show up parts of form based on values prefilled by user. In that case you do not need to rework Sonata registration form, but for user experience it will be the same.

Typo3 and DirectMail - Substitute

The template for my newsletter that I send with DirectMail in Typo3 is like this:
<span>DEAR ###USER_first_name### ###USER_last_name###</span>
But theres a link to "Show Newsletter in browser". In this case it would be impossible to show the name, since this info is in tt_address and its filled when the Engine sends the email, but I would like to replace it so that at least the user can read:
Dear reader,
Is there any way to do this, so that the email keep showing the name, while the web version shows the generic greeting?
You could create a second page with the generic content and link to that one in your newsletter. That page may also contain some more content, like social media "like buttons", for instance.
Or you may add a parameter to the link which identifies the user, so the web-version may load the data of that specific user from the database. In the last case, it may open up a potential security risk if your parameter is not secure enough and can be guessed or iterated over. So be sure to secure that thing if you make it personalized.

Wizard based feature install in sharepoint 2007?

I have a feature that gets installed using a WSP package, when the feature is activated, I would like the following to happen:
The feature will contain a list definition.
When the feature gets activated by an end user (the user physically clicks the feature activation button in site features admin) - I would like a modal dialog to appear then ask the user to provide some additional details.
3.1 The additional details will be supplying a certain number of names. For example Mary, John, Peter. Form logistics I can handle.
Once the form is complete that information needs to somehow get back to the feature reciever, so that I can then take the base list definition, and use it as a template to create list instances for all the names supplied - so if user had supplied Mary and Peter, then 2 list instances will be created when this feature is activated.
Is any of this possible with MOSS 2007? Thank you
There's no way to "hijack" the feature activation process in sharepoint. The (crude) solution would be to create a feature that deploys an application page (aka layouts page) and the list template/definition. On the page there should be a bunch of textboxes and a submit button.
The feature should have a receiver attached to it that after activation redirects the user to your page using HttpContext.Current. After entering all relevant data in the page ( Mary, John, Peter, etc.) just create the lists based on the list template deployed earlier from code using something like:
SPListTemplate listTemplate = web.ListTemplates["YOURLISTTEMPLATENAME"];
web.Lists.Add(listName, description, listTemplate);
There is 1 caveat though, IMHO a dealbreaker even. this won't work when the feature is activated using stsadm, seeing as there is no HttpContext!!!