firstly, sorry for my bad english and sorry if there are any questions like this one in the forum before. but I already search for it and found nothing helpful
well, in this case I’m using datapicker to pick some data, and put it into the form before it will be saved. the pop up datapicker dialog will gives us the list of the items that we choose, it’s include item name, blank textField for qty, blank textField for price and delete button to remove the choosen item. but I also need to put the ID of the choosen item for the benefit of the purchasing data, using a hiddenField. the question is how can I set this item ID value from database to the hiddenField?
ah, finally an answer thanks in advance, I’m use that CHtml::hiddenField option. but I’m not sure if this is right or not. since I put this code in the picker view, this is my code :
Can you post your surrounding code? It might be possible to rewrite this in a clearer format, which will help us to figure out the problem. I suspect that you can break the code out into a separate javascript function.
sorry, if it’s hard to understand and to read it. especially the long one, it’s because when I press enter to make it easier to read, it won’t run. so, I just kept it like that. anyway, thanks for your help