I am trying to have a field in metadata capture form, for which I am using inline command like this:
==============================================================
<item name="Branch" >
<description>The name of the Branch.</description>
<label>Branch</label>
<database data-type="VARCHAR(255)" />
<inline command = '/iw-home/iw-perl/bin/iwperl /opt/appl/cms/perl/getBranch.ipl'/>
</item>
==============================================================
The perl file looks like this:
==============================================================
#!/iw-home/iw-perl/bin/iwperl
my $workarea = $ENV{IW_WORKAREA};
my
@array = split(/\/WORKAREA/, $workarea);
my $branch = $array[0];
print <<EOF;
<?xml version='1.0' encoding='UTF-8'?>
<substitution><text required="t" maxlength="50"><default>$branch</default></text></substitution>
EOF
==============================================================
What I want is that, this field should be readonly. If I try adding readonly subelement like this:
==============================================================
<item name="Branch" >
<description>The name of the Branch.</description>
<label>Branch</label>
<database data-type="VARCHAR(255)" />
<readonly>
<inline command = '/iw-home/iw-perl/bin/iwperl /opt/appl/cms/perl/getBranch.ipl'/>
</readonly>
</item>
==============================================================
then it does not show the default value and it comes blank. Is it that I cannot use both readonly and default subelements together or am I missing something?