how to find property and element of a $form in drupal - 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 ).

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

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

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.

help me to proceed with drupal views?

I am newbie to drupal , I just created a view called "master" and i wanna manipulate the output pro grammatically for creating widget (javascript widget can embed in other website).
$view = views_get_view('master');
$view->set_display('page');
$view->execute();
$viewArray = $view->result;
$title = $view->display['default']->display_options['title'];
echo "<h2>$title</h2>";
echo("<pre>"); print_r ($viewArray); echo("</pre>");
It prints the result(in object form), But the output contains only 10 result which was mentioned while at the time of views creation.Please guide me,
1.how to get the next 10 result pro grammatically (pagination) ?
2.how to theme a views pro grammatically (since its js widget) ?
3.any live demo tutorial links to play with advanced views?
4.how to do sorting (whether i need to pass through url)?
5.how deal this with handler object?
my view preview looks like this below image
Thanxs,
Nithish.
Well, for #1 all you need to do is go into the edit control panel for that view and change the number of records to be shown on each page. Setting it to 0 lets it display all records at once.
For the others ... I wonder if views is the right solution for you. I suspect you might be better off with a custom module that returns a lot of drupal_json() calls. At very least, it's cumbersome and wasteful to be doing all this through views, since views spends so many cycles on rendering.
If you want to avoid coding a custom module, I'd suggest installing the View Bonus Pack (http://drupal.org/project/views_bonus) and using the 'Feed' display types. This will make it marginally easier to manipulate the results with js.

Trouble with getting a sort to work within a view with views_bonus_pack

This is my first time using Views in Drupal and am finding that no matter what I do, I can't seem to get my output to sort on any field at all.
I'm using the views_bonus_pack to create xml output, but not sure if that matters.
I've tried the post date field, the node Id field, the node title field, and... the output is always the same.
Any ideas?
[Update, here are screenshots of what I'm working with]
http://emberapp.com/evanmcd/images/settings-2/sizes/m.png
http://emberapp.com/evanmcd/images/untitled/sizes/m.png
And, here's the resulting XML
http://www.mapendo.org/media_viewer/items.xml
Thanks to anyone who can help.
Evan
The sort criteria are listed to the right side.
Views screenshot http://img.skitch.com/20100715-jcfqnsu8mty6r7mexeyxsis4f4.png
If you changed the sort criteria trying to get differently sorted data without to obtain any difference, then there are just two possibilities:
The sort criteria are not used for feeds; it's rather improbable.
The style plugin module has an issue, and it's not working as it should.
If Views Bonus Pack is implementing a style, each style has its own settings that change the output produced by the style. When you click on the wheel close the style name, you would see some settings fields for that purpose.
Views style http://img.skitch.com/20100711-x3ag3ew6q33r3sje36qdnd4fti.jpg
Views style settings http://img.skitch.com/20100711-mfa6xnx3ca5261uxyq5w6j75g8.jpg

Add dynamic URL (or button) to each node in Drupal

I've used CCK to create a 'Travel Offer' content-type which basically just lists the details for a travel package.
My question is how to have a button or link on each node (when the user views it) that will link to a url that includes the title of the current node (eg: example.com/requestQuote/Title_Of_This_Node).
I haven't implemented my system yet so I am free to change the content-type to include a button field or something like that...
The easiest way to accomplish this would be by adding a node-your_content_type_name.tpl.php file into your theme folder. (If you haven't done this before, all you need to do is create a duplicate of node.tpl.php and rename the copy to node-your_content_type_name.tpl.php)
The '$title' variable is available within the node template, so it should be easy to craft a little bit of PHP to print out the appropriate link target.
Edit:
Now, if you want to get a little bit fancier, you could build the link to reference the unaliased node page ('example.com/requestQuote/node/11569' or whatever) and feed it through Drupal's handy l() function to build the hyperlink.
The advantage here is that you won't need to worry about the link changing if the title changes, even though l() will automatically update the actual hyperlink that's displayed to the user.
This will probably make the custom coding on your 'example.com/requestQuote' page a lot easier too, since you can work directly with the node ids and don't need to parse titles.

Resources