I'm doing a filter and form altering with the node creation form (called "News"). I've added a filter that translates a quickly-applicable string from the form input into a more humanly readable version when it's filtered. Like this:
, but with this feature comes a part that if the "to" attribute isn't specific enough the form altering adds select lists the next postback (preview or as form_set_error on save), with strings that match %Charles% in the database.
This is for a news module so the writer can quickly add links to related things without having to directly look them up. Much like the project issue number link creator you have here.
Anyway, the issue comes when the user postbacks the result of that select list. That is when the form altering replaces the former "
" with "
" to correct the writer, and since the ID is unique everything will now work fine. BUT, the "process" part of the input filter that changes the
into a href pointing to the person's page and with the full name of the person, kicks in way before the form creation or altering. So the "preview" will still show a "Link unspecified, please select a value in the dropdown list below" instead of, say, "Charles Dickens", and will only show the correct value if you repeat the postback over again.
So, my question is: How would I go about changing the content so the input filter's process part gets the correctly altered text? Though I wouldn't be much sad if it wasn't possible. It is only during the writing state after all and won't have an ill effect when displayed later... though it may confuse the writer.
Thanks in advance.
Comments
Haha, I forgot that it
Haha, I forgot that it strips the HTML tags, it should say:
"[...] Like this: [link for=person to=Charles], [...]"
"[...] That is when the form altering replaces the former "[link for=person to=Charles]" with "[link for=person to=the_id_that_was_chosen_from_the_select_list]" [...]"
But with xml tags instead of the [], of course.
Sorry about that.