Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to create a text box that changes based on the users selection, so if Month = '03', it returns the following
"Did you ever hear the tragedy of Darth Plagueis The Wise? I thought not. It’s not a story the Jedi would tell you. It’s a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midichlorians to create life… He had such a knowledge of the dark side that he could even keep the ones he cared about from dying. The dark side of the Force is a pathway to many abilities some consider to be unnatural. He became so powerful… the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. Ironic. He could save others from death, but not himself."
I feel like I'm missing something, I've tried
if(Month = '03',
'<p>"Did you ever hear the tragedy of Darth Plagueis The Wise? I thought not. It’s not a story the Jedi would tell you. It’s a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midichlorians to create life… He had such a knowledge of the dark side that he could even keep the ones he cared about from dying. The dark side of the Force is a pathway to many abilities some consider to be unnatural. He became so powerful… the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. Ironic. He could save others from death, but not himself.</p>'
, 'a')
Obviously the formatting isn't working properly, what is the best way to handle this?
Not sure if I understand the problem, are you saying you receive special character like <p>" in the textbox output when you select month 03? Is that the problem?
Yeah, I'm able to have text show if the condition is met, what I'm hoping for is a little help with the formatting
For single quote and double quote chr(39) and chr(34) can be used, but strangely I don't see these characters in the output if I try this in the text box, looks like your output comes from some web application, not sure if I am missing something -
if(1,
chr(34)&'Did you ever hear the tragedy of Darth Plagueis The Wise? I thought not. It’s not a story the Jedi would tell you.It’s a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midichlorians to create life… He had such a knowledge of the dark side that he could even keep the ones he cared about from dying. The dark side of the Force is a pathway to many abilities some consider to be unnatural. He became so powerful… the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. Ironic. He could save others from death, but not himself.'&chr(34))
HI
Try like below
if(Month = '03',
'"Did you ever hear the tragedy of Darth Plagueis The Wise? I thought not. It''s not a story the Jedi would tell you. It''s a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midichlorians to create life... He had such a knowledge of the dark side that he could even keep the ones he cared about from dying. The dark side of the Force is a pathway to many abilities some consider to be unnatural. He became so powerful... the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. Ironic. He could save others from death, but not himself"'
, 'a')
O/P:
Thanks for that. I suppose more specifically I'm trying to work out how to make the output be formatted text. So I've worked out how to do a new paragraph, chr(13). So it so far is something like
if(Month = '03',
'Did you ever hear the tragedy of Darth Plagueis The Wise? I thought not. Its not a story the Jedi would tell you.'
&chr(13)&chr(13)&
'Its a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midichlorians to create life'&chr(13)&chr(13)&
'He had such a knowledge of the dark side that he could even keep the ones he cared about from dying. The dark side of the Force is a pathway to many abilities some consider to be unnatural.'&chr(13)&chr(13)&
'He became so powerful; the only thing he was afraid of was losing his power, which eventually, of course, he did.'&chr(13)&chr(13)&
'Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. Ironic. He could save others from death, but not himself.')
The next thing I'm trying to do is change some of the text to bold, so let's say I would like dark side to be bold, how would I go about doing that?