XML Form Builder display issues

139 views
Skip to first unread message

Ryan Johnson

unread,
Feb 10, 2012, 3:48:11 PM2/10/12
to islandora
Hi. I am relatively new to the Form Builder interface, but finally
figured out how to properly create a 'select' type of field. However,
it currently displays in a simple selectable field with the listed
values I input. Ideally I want a combo box / drop down situation with
a button for drop downs. These options don't seem to appear in the
'Advanced Form Controls' tab. How do I go about this?

Also as an aside, I usually see in documentation vastly different
theming, if you will, of the resultant forms, and I am interested in
how I would, for example, make the field label and field horizontal
(on the same level, row, whatever you want to call it) instead of
vertical (field label followed by the field on the next line). Is this
beyond the Form Builder's capabilities?

Thanks!

David Wilcox

unread,
Feb 13, 2012, 2:04:57 PM2/13/12
to isla...@googlegroups.com
Hi Ryan,

Have you had a look at the default MODS forms included in Islandora?
Each of them uses a number of drop-down fields, so you could open one
of these forms up for editing in the XML Form Builder and see how
these fields have been constructed.

You can change the way fields and labels are displayed in one of two ways:

1. By using CSS via the theme layer
2. By using the Attributes section under More Advanced Controls in the
XML Form Builder - but this would make changes on a field-by-field
basis: http://api.drupal.org/api/drupal/developer%21topics%21forms_api_reference.html/6#attributes.

So if you want to change the look of more than one or two fields you
should probably do that using CSS.

Hope this helps!

David

> --
> You received this message because you are subscribed to the Google Groups "islandora" group.
> To post to this group, send email to isla...@googlegroups.com.
> To unsubscribe from this group, send email to islandora+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/islandora?hl=en.
>

--
David Wilcox, BA, MLIS
Islandora Training/Support Coordinator
Robertson Library
University of Prince Edward Island
dwi...@upei.ca
Skype Name: david.wilcox82
902.620.5167

Ryan Johnson

unread,
May 11, 2012, 3:18:41 PM5/11/12
to isla...@googlegroups.com
So this issue has come up again, but in a different context.

I am using the 'select' type, and under Options putting in separate 'values' and 'labels' for them, e.g. "eng" value and "English" label. However, it is neither saving the values nor entering them in correctly into the XML document. Upon submission, it fills in the label and not the value. After exiting out and returning, the actual value I put in under Options for 'value' gets overwritten by the value in 'label'. Is this a known bug in older versions of Islandora (we aren't running the most current version)? 

David Wilcox

unread,
May 14, 2012, 9:43:10 AM5/14/12
to isla...@googlegroups.com
Hi Ryan,

This may be an issue with the schema - you're editing one of the
default MODS forms, right? What element are you referencing for your
select list (e.g. typeOfResource)? Some elements have controlled
vocabularies within the schema itself, so you won't be able to use
terms that don't correspond to the controlled vocabulary in your
select list. The form won't give you an error, but you'll get odd
behaviour when you try to submit.

David
> --
> You received this message because you are subscribed to the Google Groups
> "islandora" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/islandora/-/HsVRydO1E70J.

Ryan Johnson

unread,
May 15, 2012, 11:01:28 AM5/15/12
to isla...@googlegroups.com
Right, I am working off MODS, but I am trying to mirror this set of elements from a document:

<language displayLabel="Language(s) of Narration">
   
<languageTerm type="text">Japanese</languageTerm>
   
<languageTerm authority="iso639-2b">jpn</languageTerm>
</language>

So I had put in a tabpanel to allow for multiple instances of languages. Then for the '<languageTerm authority="iso639-2b">' bit, I had put in a select list that displayed 'Japanese' and had the value of 'jpn'.

But the behavior still doesn't quite make sense, because it won't save 'jpn', even though that's a valid iso639-2b code: it only saves 'Japanese' in both the label and value fields.  

Thanks

Ryan Johnson

unread,
May 18, 2012, 12:22:30 PM5/18/12
to isla...@googlegroups.com
So I haven't been able to make any progress here. The behavior still isn't making sense, because no matter what element I choose, putting in a 'label' that differs from 'value' -- even when the value is from a controlled list and the label is not -- defaults into the label and value being the same.  
Reply all
Reply to author
Forward
0 new messages