I have a question and hope someone can point me in the right direction.
I'm using fluidity to deal with my form submisions and have got everything working nicely so far, However I'm looking at adding an Action field which I've setup as a text box using the following;
tabConfig.AddField(p => p.Action);
However when they go to edit, its a text box and they have to type in the action manually e.g Responded, No further action, Waiting reply
What I'm looking to do is have a drop down box which has a list of actions they can quickly use.
Could someone point me in the right direction how I could do this?
Thanks I did try that but didn't seem to do anything when I tried before, I did notice the only thing different is;
(f => f.Action)
(p => p.Action)
Whats the difference in using F or P? using F works fine so thanks :)
However, it doesn't seem to be working as it should. I get a drop down box and it shows all my values. but when I select a value in drop down and save it. the change converts to a number rather then the text?
No real difference, I just copied the example from my Fluidity config on my site where I used 'f'. I would make sure it matches throughout your code for consistency. So if you use 'p' elsewhere, stick with it.
The dropdown picker saves the index of the item selected if I remember right. So it should be able to pick up and display the selected value still in the back office still.
This would be a bit different if you then needed to render it in a view, as you couldn't use the built-in property value converter. I think there is a way to get the selected value from the index but off the top of my head I can't remember where I found the docs on it.
The other solution could possibly be value mappers. Although I haven't used them myself yet.
Fluidity Drop down
Hello all,
Hope we're all looking forward to the weekend!
I have a question and hope someone can point me in the right direction.
I'm using fluidity to deal with my form submisions and have got everything working nicely so far, However I'm looking at adding an Action field which I've setup as a text box using the following;
However when they go to edit, its a text box and they have to type in the action manually e.g Responded, No further action, Waiting reply
What I'm looking to do is have a drop down box which has a list of actions they can quickly use.
Could someone point me in the right direction how I could do this?
Thanks in advance,
Matt
Hello,
Anyone able to help with this?
Thanks Matt
If you have a data type set up in the back office you can select that either by name or by id.
So if your action responses were set up in a Data Type called "Action dropdown"
Should set that data type as the editor for that field.
Full details can be seen in the awesome docs
Hope that helps.
Hello Anthony,
Thanks I did try that but didn't seem to do anything when I tried before, I did notice the only thing different is;
(f => f.Action)
(p => p.Action)
Whats the difference in using F or P? using F works fine so thanks :)
However, it doesn't seem to be working as it should. I get a drop down box and it shows all my values. but when I select a value in drop down and save it. the change converts to a number rather then the text?
Thank you.
No real difference, I just copied the example from my Fluidity config on my site where I used 'f'. I would make sure it matches throughout your code for consistency. So if you use 'p' elsewhere, stick with it.
The dropdown picker saves the index of the item selected if I remember right. So it should be able to pick up and display the selected value still in the back office still.
This would be a bit different if you then needed to render it in a view, as you couldn't use the built-in property value converter. I think there is a way to get the selected value from the index but off the top of my head I can't remember where I found the docs on it.
The other solution could possibly be value mappers. Although I haven't used them myself yet.
is working on a reply...