How to use PHP code inside readonly input field ?
-
I have a form and I need to use a readonly input for the Subject field. Therefore I need to use current page title (<?php the_title(); ?>). How can I achieve this inside Contcat Form 7. Here is my code for the Subject,
<div class=”form-group”>
<label for=”selectedPackage”>Selected Package</label>
<input type=”text” class=”form-control” id=”selectedPackage” value=”‘.the_title().'” placeholder=”Your Package” readonly />
</div>I surf the internet but I couldn’t find anything helpful. Even in the plugin docs.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to use PHP code inside readonly input field ?’ is closed to new replies.