Adding a field to old versions of a form - infopath

In infopath I added some fields to upgrade an existing from.
The problem is that when old saved forms are opened, all the new fields are greyed out and unusuable. I just want to take their default values and be usable.
How can you achieve this?

The answer is that you need existing forms to increment their version number in their XML headers. The XML xsn forms keep track of which versions had which fields, so new fields are disabled on older forms.

Related

Intranet with custom Workflows in OpenAtrium/Drupal

I've been reading about building an intranet site with different frameworks and I've found Open Atrium to be a great alternative since it's naturally oriented to that use.
I'd love to add some custom workflows associated with personnel management, for example, each team member gets a reminder every Friday to fill out a form with the hours of the week dedicated to each project. Once submitted, the role 'administrator' gets notification of all the forms received and of those not received, the details of each one and the sum of hours per
project. Any insight on how to proceed with this implementation would be greatly appreciated.
I've searched but haven't found a module that has this kind of workflow. How would this be implemented with cck, views or fields?
I would use the Rules module to create the first part: emailing users to remind them to fill in their forms. The rules module has a 'Send mail to all users of a role' action which you can use.
I would use the Views module to create a new view of the filled in forms (which I assume will just be nodes of a certain content type) and make that view accessible only to the administrator in the view's 'Access' section. Views are quite powerful, and you'll probably be able to do most all of what you require with them, but it's hard to be more specific without knowing which version of Drupal you're using and any more details about the problem (such as, will this form users are filling out really be just a node or a webform?). As an example of a views feature: if you go to add a field to your view, you should be able to see a ' Global: Math expression' field, where you can do things like add previous fields together, etc.
On the other hand, if you use the Webform module to build the form users have to fill out, that can send an email automatically each time it's submitted and the responses can be downloaded into an excel file by the administrator to manipulate further.
Hope some of those ideas help!

Tool tip (instructions) in Component fields and conditional field values in SDL Tridion components

Is it possible to implement tool tip (instruction) for SDL Tridion component fields using GUI extension? If so, could you please provide the details on how it can be done. The tool tip should appear right next to the field whenever the cursor is placed on the field.
Based on the selected value in one field of SDL Tridion component, can the values in an other field be restricted to specific set of values? For example, country and city fields. When the country is selected, city field should only show the cities of the selected country.
A custom tool tip with instructions for a field
You may consider using custom URLs to accomplish the same functionality. You can provide a separate URL for every field, so you could easily have a "/Extensions/Instructions/Article_Body.html" for one field and ""/Extensions/Instructions/Article_NavTitle.html" for another. That way the user can click the field name to pop up your HTML files with instructions. Although the GUI is different from what you describe, it will require less custom coding.
If you're stuck on the GUI as described in the requirements, I suggest you start by writing your own GUI extension and show us how far you got.
A dependency between fields
As Jeremy said already this is not a default option in Tridion, but can be accomplished (like pretty much anything) in a GUI extension.
This type of requirement has been covered quite extensively already in these questions:
Dynamic drop downs in Tridion designing in schema in SDL Tridion 2011 SP1
how to pass embedded schemas as drop down for the content schema in SDL Tridion 2011 SP1
Check out Can we show a different tooltip when a Dashboard Button is disabled? for the answer to question 1. The default option for question 2 is that it is not possible to do this. A GUI extension could be the answer though.
Custom URL and Description
+1 to Frank on Custom URL. Organization-specific help pages definitely help authors. Though they may not use Custom URLs for this, see a great user guide example from Yale.
Don't forget the description field. This is the easiest way to give authors basic instruction for each field and it shows as a tool tip.
For the text within a field, you can also use default settings. If you're using the inline UI (formerly SiteEdit), consider Content (Component) Types to set default values and instructions.
Category & Keyword (as a tree) for Field Dependencies
Use Categories and Keywords displayed with the "tree" option by setting subcategories (such as country) to abstract keywords. Set selectable keywords (e.g. cities) to normal. Then select the tree option to make it easier to navigate between the options.
If the use case is actually countries and cities, consider offering a better interface than the tree selector or drop-downs.
The catch is only the normal keywords would be saved in the component. However, there are workarounds to getting the keyword path.
Update: Custom Urls are not deprecated, only the old script was deprecated in favor of a new approach in SDL Tridion 2011 SP1.

How to add additional fields to a file field/widget in Drupal7

I have a file field in Drupal 7 that I need to add additional fields to.
Currently the only available field is the file upload itself and a description. I would like to add a title field and a dropdown with some hard-coded options. I still require all the functionality of the file field.
How can I do this? I think I need to create a new file widget but not sure how to begin.
Thanks.
One solution is to use http://drupal.org/project/field_collection
It basically allows you to group a number of fields together to a single "thing".
http://drupal.org/project/media is a different approach, which makes images, videos and so on to separate entities to which you can attach fields.
You could also create your own field, but it's probably overkill, http://www.agileapproach.com/blog-entry/compound-fields-drupal-7.
Personally I would recommend the Media module, sadly it's a little buggy right now.

drupal form alter in webform forms

I know that there is possible to use some functions to alter drupal core forms: hook_form_alter().
Can we use this with Drupal forms that are created with the Webform module?
In Drupal 7, you can either use hook_form_alter() or hook_form_<formid>_alter(), which ever you prefer. Just make sure you get the naming and parameters right. Drupal 6 only supports hook_form_alter() however.
When you create these functions, also remember that Drupal may not always pick up on them until you've flushed the cache.
Another important thing to note is that if you want to make changes to the webform fields, you have to make changes in $form['submitted']. I made the mistake of originally trying to edit $form['#node']->webform['components'], which has no effect.
More information can be found here: http://drupal.org/node/1558246
Hope that can help.
You can do it,
you just need the id of the node and then use the id like in
hook_form_<FORMID>_alter()
the FORMID generated is webform_client_form_<NODEID>
where NODEID is the id of the node
so if you have a module named mymodule and a node with id 44 which has a webform
function mymodule_form_webform_client_form_44_alter(&$form, &$form_state) {
// code here;
}
You can use hook_form_alter(), accessing elements via $form['submitted'].
I am not quite sure what you are trying to do, but since webform module creates a content type - webform - you can alter forms created by webform purely through the admin interface - add new inputs and input types, specify whether they are required or not etc.
for example, a "contact us" form can have whatever inputs you want - unlike the core Drupal contact form which IIRC only has an email address and a textarea.
Yes, if for some reason you need to make a change to the webform which you can't do by editing the webform node, then you can use hook_form_alter to change the form as well, as the webform is created by the form api.
That said, do poke around in some of the corners of webform - it comes with a number of options for dynamically filling or changing parts of the form already.

Drupal, CKEditor: custom formatting options issue

For some reasons the checkboxes in "custom formatting options" are always selected. Even if I unselect them and save them, they remain selected.
Screenshot: http://dl.dropbox.com/u/72686/customFormattingOptions.png
Could you explain me why ?
thanks
Sounds like the form is not submitting properly, and just keeps using the old values. As a temporary fix, you can either:
Debug the module's PHP code and fix the form submission yourself
Or look in the database and manually make the necessary changes to the configuration (might be in the variable table or in a custom table created by the module itself)
As a more permanent solution, I'd file a bug in the module issue queue for the module you're using to integrate CKEditor on your site. If you tell us what version of Drupal and what module (and its version) you're using to integrate CKEditor with Drupal, someone here might be able to debug the code as well.

Resources