Hi Greyhead,
We ave recently purchased on your website the file for the placehoder (Using ‘placeholder’ labels).
I would like to replace the placeholder labels by the instruction for user instead.
Meaning, instead of get the Label Text value inside the field, I would like to include the Instructions for user.
Do you have any advice to modify your code to do so ?
Regards
We ave recently purchased on your website the file for the placehoder (Using ‘placeholder’ labels).
I would like to replace the placeholder labels by the instruction for user instead.
Meaning, instead of get the Label Text value inside the field, I would like to include the Instructions for user.
Do you have any advice to modify your code to do so ?
Regards
Hi laurentmartin,
There's a CSS selector that finds the label associated with each input. This would need to be changed to find the User Info <div> instead. I think that would do it.
Bob
There's a CSS selector that finds the label associated with each input. This would need to be changed to find the User Info <div> instead. I think that would do it.
Bob
Hi Bob,
I didn't understand very well, can you clarify a bit better which CSS file you are talking about?
Thanks
I didn't understand very well, can you clarify a bit better which CSS file you are talking about?
Thanks
Hi laurentmartin,
It's a CSS selector in the JavaScript that is used to find the inputs and labels.
Bob
It's a CSS selector in the JavaScript that is used to find the inputs and labels.
Bob
Hi Bob,
Can you indicate the path of this file on your own install, so that I can find it too.
I have checked in the com_chronoform folder of my install and i didn't find any javascript file related to your form .
Can you indicate the path of this file on your own install, so that I can find it too.
I have checked in the com_chronoform folder of my install and i didn't find any javascript file related to your form .
Hi laurentmartin,
It's this line
Bob
It's this line
var label = this.getParent().getElement('label');
Not strictly a CSS3 selector when I look at again it but a string of JavaScript methods. The problem is to find a way to uniquely identify the user-info span starting from the input.Bob
Hi Bob,
Yes i found out this line which select the elements in the div.
In your case you select "Label" and you grab the value in it which is included in the parent div of the element, but i would need to select the value included in the children div of "small-message" .
How can i access it ?
Yes i found out this line which select the elements in the div.
In your case you select "Label" and you grab the value in it which is included in the parent div of the element, but i would need to select the value included in the children div of "small-message" .
How can i access it ?
Hi Bob,
Any suggestion about this ?
Thank you for your help.
Regards
Any suggestion about this ?
Thank you for your help.
Regards
up
Hi laurentmartin,
You could try this:
Bob
You could try this:
var label = this.getParent().getElement('.small-message');
Bob
Hi Bob,
I replaced the line as you suggested but it didn't work.
Any other suggestion ?
I replaced the line as you suggested but it didn't work.
Any other suggestion ?
Hi laurentmartin,
Probably there are other changes needed in the code, you'll need to work through and debug :-(
No-one else has ever asked for this so its not high on the To-Do list :-(
Bob
Probably there are other changes needed in the code, you'll need to work through and debug :-(
No-one else has ever asked for this so its not high on the To-Do list :-(
Bob
HI Bob,
Thanks for your comment.
As I am new at coding do you have any advice to give about how to debug efficiently the javascript code ?
I mean do you use a software or do you process step by step placing some alert between line to check if javascript go trough ?
Thanks for your comment.
As I am new at coding do you have any advice to give about how to debug efficiently the javascript code ?
I mean do you use a software or do you process step by step placing some alert between line to check if javascript go trough ?
Edit,
Your suggestion is working properly.
I have replaced all the 'label' by '.small-message' and it works perfect.
A big thank you to you Bob.
Your suggestion is working properly.
I have replaced all the 'label' by '.small-message' and it works perfect.
A big thank you to you Bob.
This topic is locked and no more replies can be posted.