Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Two Text Fields in a Form

  • 09-04-2015 10:23pm
    #1
    Registered Users, Registered Users 2 Posts: 769 ✭✭✭


    Ok I thought this was the best place to post this.

    I have a form.....with a hidden text field and a text field for posting messages.

    The Hidden field is used for Headlines which I want to come through identifying where it came from and whom if the person forgets to put that in the message.

    The thing is I do not want a comma separating the two when it comes through.

    Example:

    HEADLINE , This is the message

    I don't know even the search term to trawl through google....is it possible to remove this comma or even replace it with a dash "-" instead?

    thanks


Comments

  • Registered Users, Registered Users 2 Posts: 419 ✭✭Mort5000


    Which language?


  • Registered Users, Registered Users 2 Posts: 5,660 ✭✭✭veryangryman


    if its java something like...

    String beforeString = "Stuff,moreStuff";
    String afterString = beforeString.replace(",", " ")

    This replaces the comma with a space, effectively removing the comma. Put the dash where the space is to do the desired if thats what you prefer.


  • Registered Users, Registered Users 2 Posts: 11,989 ✭✭✭✭Giblet


    The two inputs have the same name or id, this will cause them to concat together with a ",".
    Give the inputs unique names.


  • Registered Users, Registered Users 2 Posts: 769 ✭✭✭EIREHotspur


    ah ok....that explains it.....I can't give them the same name as they are for a Push Notification...

    I will have to live with it I suppose.....thanks lads.


  • Registered Users, Registered Users 2 Posts: 11,989 ✭✭✭✭Giblet


    I mean, two inputs with the same name will cause the issue, the solution is to give them unique names, can you show a excerpt of the HTML?


  • Advertisement
Advertisement