1

Topic: Default values in recording form

I have set up a dynamic form for people to submit records. Users who have not registered are able to enter records, but I would like to ask for their name and email to make the records useful for all recording schemes. Therefore, I have added two fields at the top of the form asking for their name (not required) and email address (required). The same form is visible to registered users so I wanted to populate these fields automatically with the data captured through EasyLogin. My current form structure is attached. My problem is that the name and email fields aren't appearing automatically in the boxes for registered users. Can anyone point me in the right direction?
Many thanks
Rachel

Post's attachments

Single Record User Interface.docx 13.37 kb, 6 downloads since 2013-03-15 

You don't have the permssions to download the attachments of this post.

2

Re: Default values in recording form

I was also wondering whether this could be connected to the problem I am having linking a username to records uploaded as a csv which I posted about previously...

3

Re: Default values in recording form

Hi Rachel

Quick answer, try the following:

[smpAttr:272]
@default={user_id}
@label=Your name
[smpAttr:9]
@default={email}

Answers to your csv problem were posted earlier today.

Jim Bacon

4

Re: Default values in recording form

Hi Rachel,
when you edit the form, in the "User Interface" have you ticked "Copy field values from user profile"?

In my form I simply referenced the custom attributes I wanted and they then populated because I had ticked the option to copy the fields from the profile.

I hope this helps,
Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar

5

Re: Default values in recording form

Hi Again,

Good point, Fiona. That is an alternative but, for it to work, your profile fields and your custom attributes need to match exactly which is not the case at the moment.

And, by the way, Rachel, you were soon going to discover that {user_id} is a number and not a name and {username} is often a bit random so you might have been reaching for {profile_first_name} and {profile_last_name} soon anyway.

I wonder if the following works...

[smpAttr:272]
@default={profile_first_name} {profile_last_name}
@label=Your name

Jim Bacon

6

Re: Default values in recording form

Yes, that should work Jim. In fact we use the following slight variation in iRecord:

@default={profile_last_name}, {profile_first_name}
John van Breda
Biodiverse IT

7

Re: Default values in recording form

Many thanks for all your replies!
In my user interface I have now got:

[smpAttr:272]
@default={profile_first_name} {profile_last_name}
@label=Your name

However, what I see in the recording form is:

Your name: {profile_first_name} {profile_last_name}

I'm sure I'm doing something really obviously wrong but don't know what it is. Apologies.

8

Re: Default values in recording form

No, it is just another bug in Instant Indicia 0.8.2 which has already been fixed in the development trunk.
See r5342

Once again, your options are file replacement or patching. Is that enough information for you to figure it out?

Jim Bacon.

9

Re: Default values in recording form

Hi Jim
Sorry, I've been totally distracted by other things. Just tried this and it works fine.
Many thanks!
Rachel