How to remove dots and page number of list of figures and list of tables in table of contents

Heydo!

I need to include the first pages to TOC and NOT include page numbers. How I can I achieve this? \listoffigures and \listoftables makes a dotted line and a page number to TOC which I want to get rid of. I've searched for a number of questions but I always find answers to remove page number IN toc, which I have done already.

ABSTRACT
LIST OF FIGURES
LIST OF TABLES
CONTENTS
CHAPTER 1...................................6
CHAPTER 2...................................7


Minimal working example:

% docmentclass
\documentclass[12pt]{article}

\usepackage{tocloft}

% package to enable commands after pages
\usepackage{afterpage}

% dots to TOC
\AtBeginDocument{
\renewcommand\cftsecdotsep{\cftdot}
\renewcommand\cftsubsecdotsep{\cftdot}
}

%remove incremental number from TOC
\let\oldsection\section
\newcommand{
\abstractsection}[1]{
\newpage
\oldsection*{#1}
}

%for captions to show up in lof and lot
\usepackage{caption}

\begin{document}

%frontcover
\begin{center}
\vspace*{5cm}
\normalsize{Tuomas-Matti Soikkeli} \\
\large{Front Cover}
\vfill{}
\end{center}

%abstract
\abstractsection{ABSTRACT}
Some abstract content
\newpage

%list of figures and list of tables
\listoffigures
\listoftables
\newpage

%ToC
\tableofcontents
\newpage

%contents
\section{FIRST CHAPTER}
\begin{figure}[H]
figure
\caption[EXAMPLE FIGURE]{example figure}
\end{figure}

\section{SECOND CHAPTER}
\begin{table}[h]
table
\caption[EXAMPLE TABLE]{example table}
\end{table}

\end{document}


Ends up being:

You should use some of the functionality provided by tocloft. Instead of using \addcontentsline{<file>}{<type>}{<title>}, use \cftaddtitleline{<file>}{<type>}{<title>}{<page>}. Using the latter allows you to use an empty <page> argument:

\documentclass{article}

\usepackage{tocloft}

% dots to TOC
\AtBeginDocument{
\renewcommand\cftsecdotsep{\cftdot}
\renewcommand\cftsubsecdotsep{\cftdot}
}

%remove incremental number from TOC
\newcommand{\abstractsection}[1]{%
\clearpage
\section*{#1}
}

\begin{document}

%abstract
\abstractsection{ABSTRACT}

Some abstract content

\clearpage

% List of Figures and List of Tables
\listoffigures
\listoftables

\clearpage

\tableofcontents

\clearpage

%contents
\section{FIRST CHAPTER}
\begin{figure}[ht]
figure
\caption[EXAMPLE FIGURE]{example figure}
\end{figure}

\section{SECOND CHAPTER}
\begin{table}[ht]
table
\caption[EXAMPLE TABLE]{example table}
\end{table}

\end{document}


Additionally, you have to insert (very strategically) entries into the ToC file to remove the leaders. I've done so and commented those locations above. The .toc file should now resemble:

\renewcommand {\cftsecleader }{\hfill }
\contentsline {section}{ABSTRACT}{}
\contentsline {section}{LIST OF FIGURES}{}
\contentsline {section}{LIST OF TABLES}{}
\contentsline {section}{CONTENTS}{}
\contentsline {section}{\numberline {1}FIRST CHAPTER}{5}
\contentsline {section}{\numberline {2}SECOND CHAPTER}{5}


This way of adjusting the ToC-related content is necessary, since the ToC is processed as a whole before the rest of the document is set. You have to insert the adjustments within your document that correspond to the sequence within the ToC.