Need to change value of checkbox if depending on link in Drupal 7 - drupal

I have a webpage with two links, for example example.com/link1 and example.com/link2. Both links must to link to the same webpage, only for first link (example.com/link1) the form on the linked page should have checked checkboxes, but for other unchecked.
Maybe somebody can just advise on how to do that, just the idea hoe to do that using Drupal.

I'm looking for something slightly similar and remembered the "Flag" module. I'm not sure if you can get to it via a URL, but it seems like it might be possible.
http://drupal.org/project/flag

Add a query to your link (ex: example.com/linked?checked=1 - see the $options argument for l()) and test for this using $_REQUEST['checked'] in your form.

Related

How can an input and output show linked in BizTalk and not have a connection?

I need to add an extra field to a BizTalk service call.
I added the field as an element in the input and output schemas.
Then I was going to map the input and output in the mapper.
But I was faced with this:
The old fields show as linked and they are working. But there's no visible link. I would like to add the new field and map it the same way and not link it directly.
Anyone knows how this can be linked?
I searched for the old fields in the solution and I couldn't find anything that could explain this. I guess there must be some property I don't know about but I don't see anything either.
The link is done in another page. I forgot you can scroll through pages in biztalk mapper

Drupal: How to Figure Out the token for a Specific Field?

I would like to know how to 'construct' tokens. I have read many examples, but somehow I don't understand them. I am new to Drupal and at the moment I am testing how it works. I'm trying to hide the title of a content type I've created and automatically replace it with the content of another field. As far as I know, I have installed and enabled all the relevant modules including CCK and Automatic Entity Label. The only thing I don't know is what token I should use to make it happen. The field I would like to use as the source for the title field is called event (or possibly field_event) and is of type text. I'm visually impaired and either I'm doing something wrong, or the token browser is not too screen reader friendly. Either way, I can't access the list of all tokens to select the token, so I have to enter it manually. If I'm not mistaken, the token should include '[node:body]', right? But is it like '[node:event:body]' or '[field:event:body]' or something else?
Many thanks!
One Idea might be the devel module https://drupal.org/project/devel . Install it, activate it and visit some page of the node type you want to use the token on, and click on the devel tab and then on the token tab. et voila. or you navigate directly to e.g. yoursite.com/node/29/devel/token .
Hope it helps.

how to find property and element of a $form in drupal

I just started to work with Drupal modules. I have seen in some codes that some elements and properties (if I called them correctly, # for property) are assign to the $form. I have been googling but I couldn't find any useful document that shows this variable (again if I called it correctly) what kind of properties and elements has and in which tables it store?
and how can I debug them ?
i.e. $account_form=&$form;
$account_form['name']['#suffix']
I have check profile.module but it didn't help me!
TNX
If you have a php debuger in your editor you can use it to find out what variables you have. On the other hand you can use print_r($form); and that will show you the array(hint in browser user CTRL+U to see the source, you'll find that in the source the form array looks nicer), or you can use var_dump().
If you want to create the form, and you want to know what options do you have, there is the Drupal Form Api( https://api.drupal.org/api/drupal/developer%21topics%21forms_api_reference.html/7 ).

Searching for a specific string in TinyMCE

I'm creating a short-code generator for the WordPress Add/Edit Post/Page screen.
I want to make sure that there does not exist more than one short-code in the same post/page. So I added an onclick function for the button so that whether there already exist a short-code, could be checked.
How do I go on doing this?
I searched around the TinyMCE API and the closest I got was the tinymce.Formatter.match method. But there's no example on this page. I don't really think that this has anything to do with the content search anyway.
Another way would be to simply use the getContent method and run javascript code against it. But I guess this wouldn't be the best option if there's something built-in for this already.
I do not know exactly what you mean by the term "short-code".
But i guess it is a string you can find using getContent-Method.
There are several other ways to search the editor content.
Since tinymce editor is rendered inside an iframe and is indeed real html code you can use all regular DOM-Methods of your browser. There are even some additional DOM-Methods provided in tiny_mce/classes/dom/DOMUtils.js.

How Can Wordpress Easily Provide A Voting and Commenting View For 5 Page Layout Possibilities?

Right now, when I create a media item, I can view it as admin by going through the Media then clicking on view, eventually I end up at [mysite]/blog/?attachment_id=31 which is a nice reduced version of the image (which can be clicked to appear large), and which has the nice feature that there is a place to leave comments at the bottom.
This is great for administrators. But I want anonymous users to be able to look at 5 different, fairly similar images, and make comments on the pages separately. So I'd like for the anonymous users who navigate to [mysite]/blog/?attachment_id=31 to find the same page the way it looks to admins.
But when going to that URL as an anonymous user instead of the image with comment form I get:
Sorry, no posts matched your criteria
So, how can I enable this permission for anonymous users?
If this is not possible, please rephrase the question as, "What is the best way to use Wordpress to get a bunch of anonymous people to vote on 5 different layouts and also to be able to comment on each of them separately, as I am trying to do at http://christian-filipina.com/blog/ ? (None of these are public URLs, please don't link to them.)
Do I need to create a page for each of those separate layouts and then use HTML to link to the variously-sized versions of the images?
When adding an image to the post make sure that "attachment page" is checked instead of "image file" This should fix your problem. See: http://codex.wordpress.org/Using_Image_and_File_Attachments

Resources