I have a form, where there are three fields: Title, Slug, and URL.
I have a plugin that converts the text entered in the Title field as a slug. (For example, if I type “Joe Bloggs Goes On Holiday” would then display as “joe-bloggs-goes-on-holiday” in the slug field).
What I need to do now, is get the information in the slug field and add it to my URL field. In the URL field, there already is text (usually “/mainpage/” but this will depend on what type of page is being created). So in the URL field I would then have “/mainpage/joe-bloggs-goes-on-holiday”.
How can I achieve this?
Cheers
You can use the
.valmethod to get and set the value of fields: