I have created a new custom list form that will show 4 fields on the page from a Custom List called "Shipment". I have added Form Action button that I would like to run a custom action that is set inside of a Workflow. Currently, the form displays the fields for "Manifest Number", "Pickup Location", "Delivery Location", & "Scheduled Pickup Time". When the user clicks the Form Action button, what I want the Workflow to do is go to the ID field of the displayed content in the Form and change the value of the "Picked Up" column from No to Yes. The problem I am having is passing the ID of the displayed information from the Form to the Workflow as a variable. I can get the "Picked Up" column to update if I specify the value in the "Update List Item" window under the "Find the List Item" section, but I cannot figure out how to do this dynamically from the Form
You need to add a hidden field to store the ID in the custom list form. Copy the line that displays "Manifest Number" and change it to point to the ID field. And the change the variable name to ff6 or something like that (given you already only have 5 fields). Now when you open the custom action workflow in SPD the ID field should be available for your apply as a filter.
Hope this helps.
Related
I have dynamic form with conditional attributes.
E.g. if radio button "condition1" is checked, when "price" field hides dynamically via jQuery, and "percentage" field appears.
Let's say I created record with "condition1" radio box and set "percentage" value. Then, I decided to update record, and disabled "condition1", so percentage field hides, and I set new value for "price".
The problem is, that if I disable "condition1", "percentage" parameter is still present, and what I need is either "price" or "percentage" parameter at a time. I can removeAttribute() with jQuery on click, but this is bad user experience, because in some fields I have multiline textareas and I don't want to force users to write all again if they accidentally clicked on radio button.
I tried playing with ActiveModel::Dirty with no luck
in edit action of object's controller
if #object.condition_changed? && #object.condition_was == "condition1"
#object.attribute(:percentage, nil)
end
you can run a after update callback like
after_update: set_nil_to_unrequired_field
def set_nil_to_unrequired_field
update_column('your field ', nil) if "other field is present"
end
Hi i'm new to rails and i would like tohave number_field to show out after the user clicked the radio_button. For example, i have 3 radio_buttons. If the user clicked the 2nd one, it'll then show a number field to ask the user to enter some data required and later on pass to a function defined in controller after user click submit button.
MVS 2010 MVC 3:
I have a Submit page that has severial checkboxes that are been built dynamically as soon as the page load. The user can check one or more checkbox before submitting the form. On the right hand side of the page, there is somewhat a summary of all the previous selections that the user chose. The summary is available from the Submit page and will carry to the other pages. There is an "Add Comment" button at the very top of the page. When the user click it, a popup window with a textbox will display allowing the user to type a comment. How do I display this comment on the page without having a refresh the page?
The main reason for not wanting to do a refresh is because the user could have selected one or more checkboxes, they will lose their states as soon as the page is refreshed.
I tried parent.document.getElementById('DivCommentResult').html(data); - It displayed this message "Microsoft JScript runtime error: Unable to get value of the property 'html': object is null or undefined"
If I understand well, you have to bind the change of your check box to a function that submit a synchone ajax request that obtain the summary you need and replace target content with the result data of your request.
Is it what you want ?
I had to get the parent doucment and retrieve the div id from it.
Once I have it in hand, I set its innerHTML text to the data that I want to display.
var parentDocument = parent.document;
var el = parentDocument.getElementById('commentResult');
Once I have this, I simpley call el.innerHTML = data;
Display content of database in a form with textfields in struts2.
Here is a senario. It's just an example.There is a jsp page (abc.jsp) which shows list of employees. This page contains a button (Add employee), when user clicks this button an action abcAction is called which opens xyz.jsp asking user to fill necessary information like emp_ID, emp_name, etc. On sucess abc.jsp page is opened showing the entered information on a table. Along with this informtaion an"edit" button is appeared on the same page(abc.jsp). Now how to display xyz.jsp page when user cicks edit button along with the necessary fields entered by the user based on emp_ID.
I need to write default action for the selection if user select "Please select" on dropdown menu on rails so how can I identify whether user have selected that??
The select helper generates an option tag with no specific value for the "Please select" entry. So the params hash gets assigned "Please select" for that param when you submit the form.
I'm not familiar with rails and how select boxes are handled, but in general html mark-up you could add attribute value="0" for the "Please select" element and later check for it. If the passed value is 0 you'll know that the user failed to select something from the select box.