Reputation: 141
I am using Alfresco Community Edition 5.1.x. I have created a workflow using kick-start where I have used drop-down list.
When selecting the drop-down value, text-field should be enabled based on conditions otherwise the text-field is not showing in workflow form.
Is this possible? And how?
Upvotes: 2
Views: 192
Reputation: 1346
You can create a custom FTL which will display the form fields according to dropdown selection And you have to give the path of that ftl as your field id
<field id="xxx:propName" set="info">
<control template="/org/alfresco/components/form/controls/xyz.ftl" />
</field>
Upvotes: 0
Reputation: 1920
I've had the same problem. I've seen two choices :
show()
and hide()
functions. If you have mandatory fields, you nedd to handle that too.This is what I've done and it worked, but I would be glad if anyone have a more elegant solution.
Edit : in my case, I was making a custom component, and then had a template (ftl) and a script file (js). In this js, once the page is initialized, I added a section of code to handle what I need. The code I'm putting is just for the example :
$('#select_id').change(function(){
showHideMyComponent($(this).val());
});
function showHideCible(value){
boolean hide = checkIfIhaveToHide(value);
if(hide){
$("#divToHandle").hide();
}else{
$("#divToHandle").show();
}
}
Upvotes: 0